mirror of
https://github.com/Tivix/django-rest-auth.git
synced 2025-10-25 21:21:34 +03:00
Django allows to define custom username field through [USERNAME_FIELD](https://docs.djangoproject.com/en/1.9/topics/auth/customizing/#django.contrib.auth.models.CustomUser.USERNAME_FIELD) on custom user model. In that case there will be no `username` field so it is wrong to assume that the username field will always be present. Simplified the `vaidate` as it is safe to use `authenticate` function from `django.contrib.auth` because it takes care of `AUTHENTICATION_BACKENDS` listed in settings. And if `allauth` is in `INSTALLED_APPS` then `allauth.account.auth_backends.AuthenticationBackend` will be there as well. |
||
|---|---|---|
| .. | ||
| registration | ||
| tests | ||
| __init__.py | ||
| admin.py | ||
| app_settings.py | ||
| models.py | ||
| serializers.py | ||
| urls.py | ||
| utils.py | ||
| views.py | ||