From a5695ffa488c9666fb63496d5949a6e83fe4f9e5 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 21 Feb 2020 11:43:17 +0100 Subject: [PATCH] two more related user problems Signed-off-by: Nico Schottelius --- nicohack202002/uncloud/uncloud_api/serializers.py | 6 ++++-- nicohack202002/uncloud/uncloud_auth/apps.py | 4 ++++ 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 nicohack202002/uncloud/uncloud_auth/apps.py diff --git a/nicohack202002/uncloud/uncloud_api/serializers.py b/nicohack202002/uncloud/uncloud_api/serializers.py index f5a5a92..57532f2 100644 --- a/nicohack202002/uncloud/uncloud_api/serializers.py +++ b/nicohack202002/uncloud/uncloud_api/serializers.py @@ -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 class UserSerializer(serializers.HyperlinkedModelSerializer): class Meta: - model = User + model = get_user_model() fields = ['url', 'username', 'email', 'groups'] diff --git a/nicohack202002/uncloud/uncloud_auth/apps.py b/nicohack202002/uncloud/uncloud_auth/apps.py new file mode 100644 index 0000000..c16bd7a --- /dev/null +++ b/nicohack202002/uncloud/uncloud_auth/apps.py @@ -0,0 +1,4 @@ +from django.apps import AppConfig + +class AuthConfig(AppConfig): + name = 'uncloud_auth'