mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-20 02:11:08 -05:00
- Cleaned up and standardized assertions in ApiTestMixin for API response validation. - Updated ASGI settings to use os.environ for setting the DJANGO_SETTINGS_MODULE. - Removed unused imports and improved formatting in settings.py. - Refactored URL patterns in urls.py for better readability and organization. - Enhanced view functions in views.py for consistency and clarity. - Added .flake8 configuration for linting and style enforcement. - Introduced type stubs for django-environ to improve type checking with Pylance.
49 lines
1.5 KiB
Python
49 lines
1.5 KiB
Python
from django.urls import path
|
|
from django.contrib.auth import views as auth_views
|
|
from allauth.account.views import LogoutView
|
|
from . import views
|
|
|
|
app_name = "accounts"
|
|
|
|
urlpatterns = [
|
|
# Override allauth's login and signup views with our Turnstile-enabled
|
|
# versions
|
|
path("login/", views.CustomLoginView.as_view(), name="account_login"),
|
|
path("signup/", views.CustomSignupView.as_view(), name="account_signup"),
|
|
# Authentication views
|
|
path("logout/", LogoutView.as_view(), name="logout"),
|
|
path(
|
|
"password_change/",
|
|
auth_views.PasswordChangeView.as_view(),
|
|
name="password_change",
|
|
),
|
|
path(
|
|
"password_change/done/",
|
|
auth_views.PasswordChangeDoneView.as_view(),
|
|
name="password_change_done",
|
|
),
|
|
path(
|
|
"password_reset/",
|
|
auth_views.PasswordResetView.as_view(),
|
|
name="password_reset",
|
|
),
|
|
path(
|
|
"password_reset/done/",
|
|
auth_views.PasswordResetDoneView.as_view(),
|
|
name="password_reset_done",
|
|
),
|
|
path(
|
|
"reset/<uidb64>/<token>/",
|
|
auth_views.PasswordResetConfirmView.as_view(),
|
|
name="password_reset_confirm",
|
|
),
|
|
path(
|
|
"reset/done/",
|
|
auth_views.PasswordResetCompleteView.as_view(),
|
|
name="password_reset_complete",
|
|
),
|
|
# Profile views
|
|
path("profile/", views.user_redirect_view, name="profile_redirect"),
|
|
path("settings/", views.SettingsView.as_view(), name="settings"),
|
|
]
|