mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-13 16:34:52 +03:00
Fix mypy and add a comment to allauth documentation
This commit is contained in:
parent
d9b1bf0779
commit
a4d71a8df6
|
@ -9,8 +9,9 @@ from {{ cookiecutter.project_slug }}.users.forms import UserAdminChangeForm, Use
|
|||
User = get_user_model()
|
||||
|
||||
if settings.DJANGO_ADMIN_FORCE_ALLAUTH:
|
||||
# Force the `admin` sign in process to go through the `django-allauth` workflow
|
||||
admin.site.login = decorators.login_required(admin.site.login)
|
||||
# Force the `admin` sign in process to go through the `django-allauth` workflow:
|
||||
# https://django-allauth.readthedocs.io/en/stable/advanced.html#admin
|
||||
admin.site.login = decorators.login_required(admin.site.login) # type: ignore[method-assign]
|
||||
|
||||
|
||||
@admin.register(User)
|
||||
|
|
Loading…
Reference in New Issue
Block a user