wsvincent / djangox

Django starter project with 🔋

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Minor changes to allauth templates

stuartmaxwell opened this issue · comments

Hi there - thanks for releasing this, I'm just starting my Django journey and am loving your resources (books, blogs, podcast, git repos...) I'm creating my own version of DjangoX following your guidelines here. I've noticed what I believe are some mistakes or unnecessary code in the allauth templates. I'd be keen to create a pull request with some suggested fixes but wanted to mention them here first for you to consider.

In "templates/account/password_change.html" I believe the code class="password_change" is not needed as this class is not referenced anywhere else in the project. Also, the other templates don't have similar classes. Should we add similar classes to the other forms in the allauth templates as placeholders for future use, or should we just remove this one class?

The template in "templates/account/password_set.html" is a slightly different format to the other allauth templates, and I have created a version which keeps the layout and formatting consistent. Also this templates uses password_set_form | crispy instead of form | crispy like the other templates -- I think this is a mistake, or perhaps I don't understand what's happening here? This file also uses internationalisation ({% load i18n %}) but no other files do - do you want to start adding this to the other templates too?

As I say, I'm happy to put in the work and create the pull request, just wanted to check with you first.

Cheers,
Stuart.

Hi Stuart,

Nice catches! Yes, the password_change class is not needed. Not sure how that slipped in, probably from another project of mine.

Re password_set.html... so allauth comes with the translations options included. I removed them for simplicity but, if your site uses the Django Translations framework, they should be in there. And yup the crispy bit was a typo too! So many mistakes haha.

I've made the tweaks in the most recent commit. Thanks so much for highlighting them!

-Will