Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix templates #22

Closed
wants to merge 2 commits into from
Closed

Fix templates #22

wants to merge 2 commits into from

Conversation

lsaavedr
Copy link

With this change the templates look the same as the admin login interface with no extra templates.

You can set the root url.py like this

from mfa.views import LoginView

urlpatterns = [
    path(
        "admin/login/",
        LoginView.as_view(template_name="admin/login.html"),
        name="login",
    ),
...

@lsaavedr lsaavedr force-pushed the fix_templates branch 5 times, most recently from 93b4f75 to b724376 Compare July 31, 2024 05:27
@xi
Copy link
Owner

xi commented Jul 31, 2024

Thanks for the proposal. However, I intentionally left opinionated templates our of the repository. For example, it wouldn't make sense to use these templates for most of my personal project.

If you think that other people could benefit from these templates, you could publish them as a separate package. I would happily link to that package if you want to. But I would rather keep this out of this repo.

@xi xi closed this Jul 31, 2024
@lsaavedr
Copy link
Author

  • I think that the design that is closest to the design that Django brings by default is unopinionated because with the templates in the repository it's always necessary to add custom templates to manage login, even in the case of a site without any custom templates, to make an user interface that seems to be consistent (unopinionated should not break the consistency).
  • with this separation it is only necessary to change the base.html, this reduce the customization of all templates an edition of one file, as like in Django project

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants