How do I use the built in password reset/change views with my own templates

后端 未结 7 425
甜味超标
甜味超标 2020-11-29 16:08

For example I can point the url \'^/accounts/password/reset/$\' to django.contrib.auth.views.password_reset with my template filename in the contex

7条回答
  •  旧时难觅i
    2020-11-29 16:24

    The documentation says that there only one context variable, form.

    If you're having trouble with login (which is common), the documentation says there are three context variables:

    • form: A Form object representing the login form. See the forms documentation for more on Form objects.
    • next: The URL to redirect to after successful login. This may contain a query string, too.
    • site_name: The name of the current Site, according to the SITE_ID setting.

提交回复
热议问题