diff --git a/README.rst b/README.rst index 07074aa4..e8dcfc23 100644 --- a/README.rst +++ b/README.rst @@ -92,6 +92,7 @@ To run the test just type: .. code-block:: bash + $ cd testproject $ poetry run pytest We also prepared a convenient ``Makefile`` to automate commands above: diff --git a/djoser/conf.py b/djoser/conf.py index 02dc7b8e..fe885dc5 100644 --- a/djoser/conf.py +++ b/djoser/conf.py @@ -1,5 +1,5 @@ # flake8: noqa E501 -from django.apps import apps +from django.contrib.auth import get_user_model from django.conf import settings as django_settings from django.test.signals import setting_changed from django.utils.functional import LazyObject @@ -7,9 +7,7 @@ DJOSER_SETTINGS_NAMESPACE = "DJOSER" -auth_module, user_model = django_settings.AUTH_USER_MODEL.rsplit(".", 1) - -User = apps.get_model(auth_module, user_model) +User = get_user_model() class ObjDict(dict):