如何在django中更改默认的忘记密码模板

时间:2017-11-08 16:25:48

标签: python html django

hi! wanna make a look like the below pic! but soon after i press reset password button, at the top right corner the next page appears as Django administration, which i dont want to see!

请注意下面的编码!

urls.py

url(r'^reset-password/', auth_views.PasswordResetView.as_view(template_name='frgt_pswd.html'), name='reset_password'),
    url(r'^reset-password/done/', auth_views.PasswordResetDoneView.as_view(template_name='pswrd_sent.html'), name='reset_password_done'),
    url(r'^reset-password/confirm/(?P<uidb64>[0-9A-Za-z]+)-(?P<token>,+)/', auth_views.PasswordResetConfirmView.as_view(template_name='enter_new_pswd.html'), name='password_reset_confirm'),
    url(r'^reset-password/complete/$', auth_views.PasswordResetCompleteView.as_view(template_name='pswd_reset_cmplte.html'), name='password_reset_complete'),

正如您可以看到上面的代码,我已经添加了我想要的模板!但只有第一页出现。

tis is the page appearing after i press reset password! which i wanted to change! Please help!

HTML代码

<fieldset class="module aligned">
    <div class="form-row field-email">

        <label for="id_email">Email address:</label>
        <input type="email" name="email" maxlength="300" required id="id_email" />
    </div>
    <input type="submit" value="Reset my password" />
</fieldset>

请帮忙!

0 个答案:

没有答案