Templates reference¶
Every template the package ships, in the order you’ll typically want to
override them. Source: multifactor/templates/multifactor/.
Override by placing a file with the same path in your project’s template search path (see Branding for details).
High-value overrides¶
Template |
Renders |
Useful context |
|---|---|---|
|
Empty placeholder slotted above the |
All standard context (request, user, messages). |
|
HTML body of the fallback email when |
|
|
Outer layout used by all package pages. Override only if you want the multifactor pages to inherit from your site shell. |
Standard. |
Page templates¶
These render the user-facing flows. Override any of them to restyle.
Template |
Purpose |
|---|---|
|
The manage-factors landing page ( |
|
The factor-type picker ( |
|
The factor-selection page during a challenge ( |
|
Static help page ( |
|
The rename form ( |
|
WebAuthn registration UI. Contains JavaScript that talks to |
|
WebAuthn challenge UI. Contains JavaScript that talks to |
|
TOTP enrolment — renders the QR code and the verify input. |
|
TOTP challenge — single 6-digit input. |
|
Fallback OTP entry form. Shows “we sent your code via …” line. |
|
HTML email body (same as |
Override worked example¶
my_project/
└── templates/
└── multifactor/
├── brand.html # logo + tagline
├── email.html # HTML email branding
└── home.html # custom manage page
# settings.py
TEMPLATES = [
{
"BACKEND": "django.template.backends.django.DjangoTemplates",
"DIRS": [BASE_DIR / "templates"],
"APP_DIRS": True,
# ...
}
]
The order matters: with DIRS containing BASE_DIR / "templates", your
overrides win over the package’s templates.
See also¶
Branding — narrative guide.
URLs reference — which view renders which template.