kopia lustrzana https://github.com/wagtail/wagtail
Make password reset url configs use callables
rodzic
97d2c06a7e
commit
ad97bd5b14
|
@ -1,5 +1,6 @@
|
|||
from django.conf.urls import url
|
||||
from django.contrib.auth.decorators import permission_required
|
||||
from django.contrib.auth import views as django_auth_views
|
||||
from django.views.decorators.cache import cache_control
|
||||
|
||||
from wagtail.wagtailadmin.forms import PasswordResetForm
|
||||
|
@ -92,7 +93,7 @@ urlpatterns += [
|
|||
|
||||
# Password reset
|
||||
url(
|
||||
r'^password_reset/$', 'django.contrib.auth.views.password_reset', {
|
||||
r'^password_reset/$', django_auth_views.password_reset, {
|
||||
'template_name': 'wagtailadmin/account/password_reset/form.html',
|
||||
'email_template_name': 'wagtailadmin/account/password_reset/email.txt',
|
||||
'subject_template_name': 'wagtailadmin/account/password_reset/email_subject.txt',
|
||||
|
@ -101,19 +102,19 @@ urlpatterns += [
|
|||
}, name='wagtailadmin_password_reset'
|
||||
),
|
||||
url(
|
||||
r'^password_reset/done/$', 'django.contrib.auth.views.password_reset_done', {
|
||||
r'^password_reset/done/$', django_auth_views.password_reset_done, {
|
||||
'template_name': 'wagtailadmin/account/password_reset/done.html'
|
||||
}, name='wagtailadmin_password_reset_done'
|
||||
),
|
||||
url(
|
||||
r'^password_reset/confirm/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$',
|
||||
'django.contrib.auth.views.password_reset_confirm', {
|
||||
django_auth_views.password_reset_confirm, {
|
||||
'template_name': 'wagtailadmin/account/password_reset/confirm.html',
|
||||
'post_reset_redirect': 'wagtailadmin_password_reset_complete',
|
||||
}, name='wagtailadmin_password_reset_confirm',
|
||||
),
|
||||
url(
|
||||
r'^password_reset/complete/$', 'django.contrib.auth.views.password_reset_complete', {
|
||||
r'^password_reset/complete/$', django_auth_views.password_reset_complete, {
|
||||
'template_name': 'wagtailadmin/account/password_reset/complete.html'
|
||||
}, name='wagtailadmin_password_reset_complete'
|
||||
),
|
||||
|
|
Ładowanie…
Reference in New Issue