forked from uncloud/uncloud
Rename / prepare for merge with uncloud repo
This commit is contained in:
parent
23203ff418
commit
7a6c8739f6
118 changed files with 1499 additions and 0 deletions
15
uncloud_django_based/uncloud/uncloud_auth/serializers.py
Normal file
15
uncloud_django_based/uncloud/uncloud_auth/serializers.py
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
from django.contrib.auth import get_user_model
|
||||
from rest_framework import serializers
|
||||
|
||||
from uncloud import AMOUNT_DECIMALS, AMOUNT_MAX_DIGITS
|
||||
|
||||
class UserSerializer(serializers.ModelSerializer):
|
||||
|
||||
class Meta:
|
||||
model = get_user_model()
|
||||
fields = ['username', 'email', 'balance', 'maximum_credit' ]
|
||||
|
||||
|
||||
|
||||
balance = serializers.DecimalField(max_digits=AMOUNT_MAX_DIGITS,
|
||||
decimal_places=AMOUNT_DECIMALS)
|
||||
Loading…
Add table
Add a link
Reference in a new issue