2018-02-04 00:36:39 +00:00
|
|
|
from django.contrib.auth import views as auth_views
|
|
|
|
from django.urls import reverse_lazy, path
|
|
|
|
from . import views
|
|
|
|
|
|
|
|
|
|
|
|
urlpatterns = [
|
2018-11-08 13:18:24 +00:00
|
|
|
# Login and logout
|
2018-02-04 00:36:39 +00:00
|
|
|
path(
|
|
|
|
'login/',
|
|
|
|
auth_views.LoginView.as_view(template_name='neluser/login.html'),
|
|
|
|
name='login'
|
|
|
|
),
|
|
|
|
path(
|
|
|
|
'logout/',
|
|
|
|
auth_views.LogoutView.as_view(next_page=reverse_lazy('index')),
|
|
|
|
name='logout'
|
|
|
|
),
|
|
|
|
|
2018-11-08 13:18:24 +00:00
|
|
|
# Account activation
|
2018-02-04 00:36:39 +00:00
|
|
|
path('register/', views.register, name='register'),
|
|
|
|
path('activate/<uidb64>/<token>/', views.activate, name='activate'),
|
|
|
|
|
2018-11-08 13:18:24 +00:00
|
|
|
# Forgotten password
|
2018-02-04 00:36:39 +00:00
|
|
|
path(
|
|
|
|
'forgotten_password/',
|
|
|
|
auth_views.PasswordResetView.as_view(
|
|
|
|
template_name='neluser/password_reset.html',
|
|
|
|
email_template_name='neluser/password_reset_email.txt',
|
|
|
|
html_email_template_name='neluser/password_reset_email.html',
|
|
|
|
subject_template_name='neluser/password_reset_email_subject.txt'
|
|
|
|
),
|
|
|
|
name='password_reset'
|
|
|
|
),
|
|
|
|
path(
|
|
|
|
'forgotten_password/done/',
|
|
|
|
auth_views.PasswordResetDoneView.as_view(
|
2018-02-04 15:11:07 +00:00
|
|
|
template_name='neluser/password_reset_email_sent.html'
|
2018-02-04 00:36:39 +00:00
|
|
|
),
|
|
|
|
name='password_reset_done'
|
|
|
|
),
|
|
|
|
path(
|
|
|
|
'password/reset/<uidb64>/<token>/',
|
|
|
|
auth_views.PasswordResetConfirmView.as_view(
|
|
|
|
template_name='neluser/password_reset_confirm.html'
|
|
|
|
),
|
|
|
|
name='password_reset_confirm'
|
|
|
|
),
|
|
|
|
path(
|
|
|
|
'password/reset/done/',
|
|
|
|
auth_views.PasswordResetCompleteView.as_view(
|
|
|
|
template_name='neluser/password_reset_done.html'
|
|
|
|
),
|
|
|
|
name='password_reset_complete'
|
|
|
|
),
|
2018-11-08 13:18:24 +00:00
|
|
|
|
|
|
|
# --------
|
|
|
|
# Settings
|
|
|
|
# --------
|
|
|
|
path('settings/', views.settings_default, name='settings'),
|
|
|
|
|
|
|
|
# Security
|
|
|
|
path('settings/security/password/', views.ChangePasswordView.as_view(), name='password_change'),
|
2018-11-08 14:29:59 +00:00
|
|
|
path('settings/security/delete_account/', views.DeleteAccountView.as_view(), name='delete_account'),
|
2018-02-04 00:36:39 +00:00
|
|
|
]
|