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(
|
2019-07-24 17:07:41 +00:00
|
|
|
"login/",
|
|
|
|
auth_views.LoginView.as_view(template_name="neluser/login.html"),
|
|
|
|
name="login",
|
2018-02-04 00:36:39 +00:00
|
|
|
),
|
|
|
|
path(
|
2019-07-24 17:07:41 +00:00
|
|
|
"logout/",
|
|
|
|
auth_views.LogoutView.as_view(next_page=reverse_lazy("index")),
|
|
|
|
name="logout",
|
2018-02-04 00:36:39 +00:00
|
|
|
),
|
2018-11-08 13:18:24 +00:00
|
|
|
# Account activation
|
2019-07-24 17:07:41 +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(
|
2019-07-24 17:07:41 +00:00
|
|
|
"forgotten_password/",
|
2018-02-04 00:36:39 +00:00
|
|
|
auth_views.PasswordResetView.as_view(
|
2019-07-24 17:07:41 +00:00
|
|
|
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",
|
2018-02-04 00:36:39 +00:00
|
|
|
),
|
2019-07-24 17:07:41 +00:00
|
|
|
name="password_reset",
|
2018-02-04 00:36:39 +00:00
|
|
|
),
|
|
|
|
path(
|
2019-07-24 17:07:41 +00:00
|
|
|
"forgotten_password/done/",
|
2018-02-04 00:36:39 +00:00
|
|
|
auth_views.PasswordResetDoneView.as_view(
|
2019-07-24 17:07:41 +00:00
|
|
|
template_name="neluser/password_reset_email_sent.html"
|
2018-02-04 00:36:39 +00:00
|
|
|
),
|
2019-07-24 17:07:41 +00:00
|
|
|
name="password_reset_done",
|
2018-02-04 00:36:39 +00:00
|
|
|
),
|
|
|
|
path(
|
2019-07-24 17:07:41 +00:00
|
|
|
"password/reset/<uidb64>/<token>/",
|
2018-02-04 00:36:39 +00:00
|
|
|
auth_views.PasswordResetConfirmView.as_view(
|
2019-07-24 17:07:41 +00:00
|
|
|
template_name="neluser/password_reset_confirm.html"
|
2018-02-04 00:36:39 +00:00
|
|
|
),
|
2019-07-24 17:07:41 +00:00
|
|
|
name="password_reset_confirm",
|
2018-02-04 00:36:39 +00:00
|
|
|
),
|
|
|
|
path(
|
2019-07-24 17:07:41 +00:00
|
|
|
"password/reset/done/",
|
2018-02-04 00:36:39 +00:00
|
|
|
auth_views.PasswordResetCompleteView.as_view(
|
2019-07-24 17:07:41 +00:00
|
|
|
template_name="neluser/password_reset_done.html"
|
2018-02-04 00:36:39 +00:00
|
|
|
),
|
2019-07-24 17:07:41 +00:00
|
|
|
name="password_reset_complete",
|
2018-02-04 00:36:39 +00:00
|
|
|
),
|
2018-11-08 13:18:24 +00:00
|
|
|
# --------
|
|
|
|
# Settings
|
|
|
|
# --------
|
2019-07-24 17:07:41 +00:00
|
|
|
path("settings/", views.settings_default, name="settings"),
|
2018-11-08 20:09:17 +00:00
|
|
|
# Preferences
|
2019-07-24 17:07:41 +00:00
|
|
|
path("settings/preferences/nsfw/", views.set_nsfw, name="set_nsfw"),
|
2018-11-08 13:18:24 +00:00
|
|
|
# Security
|
2018-11-08 19:11:14 +00:00
|
|
|
path(
|
2019-07-24 17:07:41 +00:00
|
|
|
"settings/security/password/",
|
2018-11-08 19:11:14 +00:00
|
|
|
views.ChangePasswordView.as_view(),
|
2019-07-24 17:07:41 +00:00
|
|
|
name="password_change",
|
2018-11-08 19:11:14 +00:00
|
|
|
),
|
|
|
|
path(
|
2019-07-24 17:07:41 +00:00
|
|
|
"settings/security/delete_account/",
|
2018-11-08 19:11:14 +00:00
|
|
|
views.DeleteAccountView.as_view(),
|
2019-07-24 17:07:41 +00:00
|
|
|
name="delete_account",
|
2018-11-08 19:11:14 +00:00
|
|
|
),
|
2018-02-04 00:36:39 +00:00
|
|
|
]
|