forked from uncloud/uncloud
two more related user problems
Signed-off-by: Nico Schottelius <nico@nico-notebook.schottelius.org>
This commit is contained in:
parent
6ba224638a
commit
a5695ffa48
2 changed files with 8 additions and 2 deletions
|
@ -1,10 +1,12 @@
|
||||||
from django.contrib.auth.models import User, Group
|
from django.contrib.auth.models import Group
|
||||||
|
from django.contrib.auth import get_user_model
|
||||||
|
|
||||||
from rest_framework import serializers
|
from rest_framework import serializers
|
||||||
|
|
||||||
|
|
||||||
class UserSerializer(serializers.HyperlinkedModelSerializer):
|
class UserSerializer(serializers.HyperlinkedModelSerializer):
|
||||||
class Meta:
|
class Meta:
|
||||||
model = User
|
model = get_user_model()
|
||||||
fields = ['url', 'username', 'email', 'groups']
|
fields = ['url', 'username', 'email', 'groups']
|
||||||
|
|
||||||
|
|
||||||
|
|
4
nicohack202002/uncloud/uncloud_auth/apps.py
Normal file
4
nicohack202002/uncloud/uncloud_auth/apps.py
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
from django.apps import AppConfig
|
||||||
|
|
||||||
|
class AuthConfig(AppConfig):
|
||||||
|
name = 'uncloud_auth'
|
Loading…
Reference in a new issue