Commit 7582b83f authored by Claude Paroz's avatar Claude Paroz

Updated deprecated stuff

parent 96a8cd4f
......@@ -46,7 +46,7 @@ def about(request):
def site_login(request):
""" Site-specific login page. Not named 'login' to not confuse with auth.login """
def redirect(referer):
if is_safe_url(referer, host=request.get_host()):
if is_safe_url(referer, allowed_hosts={request.get_host()}):
return HttpResponseRedirect(referer)
else:
return HttpResponseRedirect(reverse("home"))
......
......@@ -36,18 +36,16 @@ urlpatterns = [
common_views.activate_account,
name='register_activation'),
url(r'^password_reset/$',
auth_views.password_reset,
kwargs={'template_name':'registration/password_reset_form.html'},
auth_views.PasswordResetView.as_view(template_name='registration/password_reset_form.html'),
name='password_reset'),
url(r'^password_reset/done/$',
auth_views.password_reset_done,
kwargs={'template_name':'registration/password_reset_done.html'},
auth_views.PasswordResetDoneView.as_view(template_name='registration/password_reset_done.html'),
name='password_reset_done'),
url(r'^reset/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$',
auth_views.password_reset_confirm,
auth_views.PasswordResetConfirmView.as_view(),
name='password_reset_confirm'),
url(r'^reset/done/$',
auth_views.password_reset_complete,
auth_views.PasswordResetCompleteView.as_view(),
name='password_reset_complete'),
# Webhook endpoint
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment