Closed raratiru closed 2 years ago
Yes; django-authlib doesn't ship any templates. This is somewhat intentional; django.contrib.auth
also references registration/login.html
and doesn't ship such a template.
I'm not fundamentally opposed to shipping a set of templates but it should probably happen in a separate app, or for example in a new authlib.packages.registration_templates
app (or something) to prevent the problem where django-authlib's templates would suddenly start overriding e.g. the templates used by django.contrib.admin
by default (resp. depending on the ordering of INSTALLED_APPS
)
By the way, https://docs.djangoproject.com/en/4.0/topics/auth/default/#django.contrib.auth.views.LoginView says:
It’s your responsibility to provide the html for the login template , called registration/login.html by default. This template gets passed four template context variables:
Oh, OK, indeed!
I had the impression that magic links would need a special template to work.
Actually, I have not yet grasped the idea of the procedure, but I will dive into the code, it is not so hard, thank you!
It is unbelievable how many things this code achieves with just a few lines.
Thank you for sharing!
Browsing it, is amazing and inspiring.
Wow, thank you! That's a really nice compliment ❤
I receive this error:
django.template.exceptions.TemplateDoesNotExist: registration/login.html
from the following line:
https://github.com/matthiask/django-authlib/blob/0c49aa7e9ef889f0c7862d5039bd1b12e780b3f9/authlib/views.py#L82
Are the templates missing?