aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_validation.py
diff options
context:
space:
mode:
authorAndrew Conti2014-10-29 16:31:36 -0400
committerAndrew Conti2014-10-29 16:31:36 -0400
commitf25f05dde58908ca6885c88499e4d5984f0f3502 (patch)
tree2ccbf5a0a7cb9d79fcaa7701ccdb09cc4297783d /tests/test_validation.py
parentc164d5b31d68b9462cd071b4fef9614db1b9ba96 (diff)
downloaddjango-rest-framework-f25f05dde58908ca6885c88499e4d5984f0f3502.tar.bz2
Update authentication.md
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.
Diffstat (limited to 'tests/test_validation.py')
0 files changed, 0 insertions, 0 deletions