feat: implement user authentication with login/logout functionality
- Add user login screen with German interface - Add user icon and dropdown menu in header for authenticated users - Add password change functionality with proper redirects - Configure authentication URLs and settings - Ensure all auth functions redirect to main page instead of admin - Complete openspec change proposal for login feature
This commit is contained in:
@@ -18,6 +18,7 @@ from django.contrib import admin
|
||||
from django.urls import include, path, re_path
|
||||
from django.conf import settings
|
||||
from django.conf.urls.static import static
|
||||
from django.contrib.auth import views as auth_views
|
||||
import dokumente.views
|
||||
import pages.views
|
||||
import referenzen.views
|
||||
@@ -32,6 +33,11 @@ urlpatterns = [
|
||||
path('stichworte/', include("stichworte.urls")),
|
||||
path('referenzen/', referenzen.views.tree, name="referenz_tree"),
|
||||
path('referenzen/<str:refid>/', referenzen.views.detail, name="referenz_detail"),
|
||||
# Authentication URLs
|
||||
path('login/', auth_views.LoginView.as_view(template_name='registration/login.html'), name='login'),
|
||||
path('logout/', auth_views.LogoutView.as_view(next_page='/'), name='logout'),
|
||||
path('password_change/', auth_views.PasswordChangeView.as_view(template_name='registration/password_change.html', success_url='/'), name='password_change'),
|
||||
path('password_change/done/', auth_views.PasswordChangeDoneView.as_view(template_name='registration/password_change_done.html'), name='password_change_done'),
|
||||
]
|
||||
|
||||
# Serve static files
|
||||
|
||||
Reference in New Issue
Block a user