36 lines
1.6 KiB
Python
36 lines
1.6 KiB
Python
from django.urls import path, reverse_lazy # type: ignore
|
|
from . import views
|
|
from django.contrib.auth.views import LogoutView
|
|
from django.contrib.auth.views import LoginView
|
|
from django.contrib.auth import views as auth_views
|
|
|
|
app_name = 'accounts' # Namensraum zum verhindern von Konflikten zwischen Apps
|
|
#
|
|
# Wichtig: Damit Links funktionieren müssen diese so eingebunden werden: {% url 'accounts:login' %} statt {% url 'login' %}
|
|
#
|
|
|
|
urlpatterns = [
|
|
path('', views.home, name='home'),
|
|
path('logout/', LogoutView.as_view(next_page='accounts:login'), name='logout'),
|
|
path('login/', LoginView.as_view(template_name='accounts/login.html', next_page='accounts:home'), name='login'),
|
|
path('register/', views.register, name='register'),
|
|
path('password_reset/', auth_views.PasswordResetView.as_view(success_url=reverse_lazy('accounts:password_reset_done')), name='password_reset'),
|
|
path('password_reset/done/', auth_views.PasswordResetDoneView.as_view(), name='password_reset_done'),
|
|
path('reset/done/', auth_views.PasswordResetCompleteView.as_view(), name='password_reset_complete'),
|
|
|
|
|
|
|
|
path('password_change/', views.password_changed, name='password_change'),
|
|
path('password_change/done/', auth_views.PasswordChangeDoneView.as_view(), name='password_change_done'),
|
|
path('delete_account/', views.deleteAccount, name="delete_account"),
|
|
path(
|
|
'reset/<uidb64>/<token>/',
|
|
auth_views.PasswordResetConfirmView.as_view(
|
|
template_name='registration/password_reset_confirm.html',
|
|
success_url=reverse_lazy('accounts:password_reset_complete')
|
|
),
|
|
name='password_reset_confirm'
|
|
),
|
|
|
|
]
|