multifactor.urls¶
The package’s urls.py (source: multifactor/urls.py) registers
app_name="multifactor", so all reverse lookups take the form
multifactor:<name>.
Routes¶
Name |
URL pattern |
View |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Static template |
|
|
Static template |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Common reverse calls¶
from django.urls import reverse
reverse("multifactor:home") # /admin/multifactor/
reverse("multifactor:authenticate") # /admin/multifactor/authenticate/
reverse("multifactor:add") # /admin/multifactor/add/
reverse("multifactor:fido2_authenticate") # /admin/multifactor/fido2/authenticate/
The multifactor:action route is special — it accepts a :-separated tuple
in a single URL component (e.g. delete:42/). The actions accepted are
"toggle", "delete", and "disable_fallback". See views.List for the
exact dispatch.
Where to mount¶
There is no convention enforced by the package. Common placements:
path("admin/multifactor/", include("multifactor.urls"))— under your admin, behind staff auth.path("account/security/", include("multifactor.urls"))— under the user account area.
Pick what suits your URL hierarchy. The app_name ensures named-URL lookups
keep working regardless.
See also¶
Architecture — which view talks to which other piece.
Branding — overriding the templates these views render.