jazzband / django-two-factor-auth

Complete Two-Factor Authentication for Django providing the easiest integration into most Django projects.
MIT License
1.71k stars 448 forks source link

Added some guidance on how to build custom templates to implementing.rst #696

Open Magnie opened 10 months ago

Magnie commented 10 months ago

Description

While trying to get WebAuthn to work, I couldn't figure out why the input field was readonly and had to dig into the original pull request to figure out I was missing JS. This just clarifies what is needed in custom templates to maintain functionality.

Motivation and Context

Documentation is lacking any information on how to build the custom templates. The only information available is in the original template: Provide a template named <code>two_factor/_base.html</code> to style this page and remove this message.

How Has This Been Tested?

Just used the Preview option when editing the documentation. Otherwise, no functional changes have been made.

Screenshots (if appropriate):

N/A

Types of changes

Checklist:

codecov[bot] commented 9 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (45cfc13) 95.52% compared to head (e3e0b83) 95.52%. Report is 14 commits behind head on master.

:exclamation: Current head e3e0b83 differs from pull request most recent head 258052b. Consider uploading reports for the commit 258052b to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #696 +/- ## ======================================= Coverage 95.52% 95.52% ======================================= Files 78 78 Lines 3354 3354 Branches 377 377 ======================================= Hits 3204 3204 Misses 119 119 Partials 31 31 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

Magnie commented 9 months ago

@sergei-maertens Thanks for your suggestions. I've committed them.

Though with your changes I noticed the formatting looks a little weird in the preview. Is that intentional? I'm not used to the .rst format, so I don't know if it is just a GitHub preview issue or if it will affect the final output in the docs.

Edit: Ah, never mind. Previewing/testing suggested changes doesn't work super well. I've fixed the formatting for real this time.