Fix mypy and add a comment to allauth documentation

This commit is contained in:
Bruno Alla 2023-06-28 23:21:40 +01:00
parent d9b1bf0779
commit a4d71a8df6
No known key found for this signature in database

View File

@ -9,8 +9,9 @@ from {{ cookiecutter.project_slug }}.users.forms import UserAdminChangeForm, Use
User = get_user_model() User = get_user_model()
if settings.DJANGO_ADMIN_FORCE_ALLAUTH: if settings.DJANGO_ADMIN_FORCE_ALLAUTH:
# Force the `admin` sign in process to go through the `django-allauth` workflow # Force the `admin` sign in process to go through the `django-allauth` workflow:
admin.site.login = decorators.login_required(admin.site.login) # 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) @admin.register(User)