Advertisement
Guest User

Untitled

a guest
Mar 22nd, 2018
310
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. path('accounts/password_reset/', auth_views.PasswordResetView.as_view(
  2. form_class=MyPasswordResetForm)),
  3. path('accounts/password_reset_confirm/', auth_views.PasswordResetConfirmView.as_view(
  4. form_class=MySetPasswordForm)),
  5. path('accounts/', include('django.contrib.auth.urls')),
  6.  
  7.  
  8.  
  9. class MySetPasswordForm(SetPasswordForm):
  10. new_password1 = forms.CharField(
  11. label=_("New password"),
  12. widget=forms.PasswordInput(attrs={'placeholder': 'New Password', 'class': 'password1'}),
  13. strip=False,
  14. help_text=password_validation.password_validators_help_text_html(),
  15. )
  16. new_password2 = forms.CharField(
  17. label=_("New password confirmation"),
  18. strip=False,
  19. widget=forms.PasswordInput(attrs={'placeholder': 'Repeat Password', 'class': 'password2'}),
  20. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement