Based on the [new documentation](https://docs.djangoproject.com/en/dev/topics/auth/customizing/#django.contrib.auth.get_user_model) for Django 1.7 we should now use: ```python @receiver(post_save, sender=settings.AUTH_USER_MODEL) ``` instead of: ```python @receiver(post_save, sender=get_user_model()) ``` because `get_user_model()` only works once Django has imported all models. Otherwise you'll get: ```python django.core.exceptions.AppRegistryNotReady: Models aren't loaded yet. ``` When trying to start your sever after adding token authentication. From the Docs, ( linked above as well ) : >New in Django 1.7: >When connecting to signals sent by the User model, you should specify the custom model using the AUTH_USER_MODEL setting.
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
authentication.md | Loading commit data... | |
content-negotiation.md | Loading commit data... | |
exceptions.md | Loading commit data... | |
fields.md | Loading commit data... | |
filtering.md | Loading commit data... | |
format-suffixes.md | Loading commit data... | |
generic-views.md | Loading commit data... | |
pagination.md | Loading commit data... | |
parsers.md | Loading commit data... | |
permissions.md | Loading commit data... | |
relations.md | Loading commit data... | |
renderers.md | Loading commit data... | |
requests.md | Loading commit data... | |
responses.md | Loading commit data... | |
reverse.md | Loading commit data... | |
routers.md | Loading commit data... | |
serializers.md | Loading commit data... | |
settings.md | Loading commit data... | |
status-codes.md | Loading commit data... | |
testing.md | Loading commit data... | |
throttling.md | Loading commit data... | |
views.md | Loading commit data... | |
viewsets.md | Loading commit data... |