diff options
| author | Étienne Loks <etienne.loks@iggdrasil.net> | 2023-03-08 18:46:23 +0100 | 
|---|---|---|
| committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2023-03-08 18:48:15 +0100 | 
| commit | f5796cb2bf4e3bbe3a71b9cdf9320aea690ddfd9 (patch) | |
| tree | afb4925208a6ee8abc889d035ebd36ed39ca3128 /ishtar_common/urls_registration.py | |
| parent | 4a1ebdc182c6e332fa46d47cea9ee6e3f8f9b646 (diff) | |
| download | Ishtar-f5796cb2bf4e3bbe3a71b9cdf9320aea690ddfd9.tar.bz2 Ishtar-f5796cb2bf4e3bbe3a71b9cdf9320aea690ddfd9.zip  | |
UI: show/hide password on login
Diffstat (limited to 'ishtar_common/urls_registration.py')
| -rw-r--r-- | ishtar_common/urls_registration.py | 31 | 
1 files changed, 25 insertions, 6 deletions
diff --git a/ishtar_common/urls_registration.py b/ishtar_common/urls_registration.py index 36795b113..0a18ff060 100644 --- a/ishtar_common/urls_registration.py +++ b/ishtar_common/urls_registration.py @@ -1,11 +1,15 @@ -from django.conf.urls import include, url +from django.conf.urls import url +from django.urls import path  from django.views.generic.base import TemplateView  try: -    from registration import views  # debian +    from registration import views as registration_views # debian  except ModuleNotFoundError: -    from django_registration import views  # pip +    from django_registration import views as registration_views  # pip +from django.contrib.auth import views as auth_views + +from ishtar_common import views  urlpatterns = [      url(r'^accounts/activate/complete/$', @@ -18,10 +22,10 @@ urlpatterns = [      # the view; that way it can return a sensible "invalid key"      # message instead of a confusing 404.      url(r'^accounts/activate/(?P<activation_key>\w+)/$', -        views.ActivationView.as_view(), +        registration_views.ActivationView.as_view(),          name='registration_activate'),      url(r'^accounts/register/$', -        views.RegistrationView.as_view(), +        registration_views.RegistrationView.as_view(),          name='registration_register'),      url(r'^accounts/register/complete/$',          TemplateView.as_view( @@ -33,5 +37,20 @@ urlpatterns = [              template_name='registration/registration_closed.html'          ),          name='registration_disallowed'), -    url("^accounts/", include('django.contrib.auth.urls')), +    # url("^accounts/", include('django.contrib.auth.urls')), +    path('accounts/login/', views.LoginView.as_view(), name='login'), +    path('accounts/logout/', auth_views.LogoutView.as_view(), name='logout'), + +    path('accounts/password_change/', auth_views.PasswordChangeView.as_view(), +         name='password_change'), +    path('accounts/password_change/done/', auth_views.PasswordChangeDoneView.as_view(), +         name='password_change_done'), + +    path('accounts/password_reset/', auth_views.PasswordResetView.as_view(), name='password_reset'), +    path('accounts/password_reset/done/', auth_views.PasswordResetDoneView.as_view(), +         name='password_reset_done'), +    path('accounts/reset/<uidb64>/<token>/', auth_views.PasswordResetConfirmView.as_view(), +         name='password_reset_confirm'), +    path('accounts/reset/done/', auth_views.PasswordResetCompleteView.as_view(), +         name='password_reset_complete'),  ]
\ No newline at end of file  | 
