mirror of
https://github.com/sissbruecker/linkding.git
synced 2025-08-08 19:28:29 +02:00
Implement login and logout views
This commit is contained in:
@@ -98,6 +98,10 @@ AUTH_PASSWORD_VALIDATORS = [
|
||||
},
|
||||
]
|
||||
|
||||
LOGIN_URL = '/login'
|
||||
LOGIN_REDIRECT_URL = '/bookmarks'
|
||||
LOGOUT_REDIRECT_URL = '/login'
|
||||
|
||||
# Internationalization
|
||||
# https://docs.djangoproject.com/en/2.2/topics/i18n/
|
||||
|
||||
|
@@ -14,9 +14,12 @@ Including another URLconf
|
||||
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
|
||||
"""
|
||||
from django.contrib import admin
|
||||
from django.contrib.auth import views as auth_views
|
||||
from django.urls import path, include
|
||||
|
||||
urlpatterns = [
|
||||
path('admin/', admin.site.urls),
|
||||
path('login/', auth_views.LoginView.as_view(redirect_authenticated_user=True), name='login'),
|
||||
path('logout/', auth_views.LogoutView.as_view(), name='logout'),
|
||||
path('', include('bookmarks.urls')),
|
||||
]
|
||||
|
Reference in New Issue
Block a user