mirror of
https://github.com/sissbruecker/linkding.git
synced 2025-08-07 18:58:30 +02:00
Implement optional registration
This commit is contained in:
@@ -16,10 +16,16 @@ Including another URLconf
|
||||
from django.contrib import admin
|
||||
from django.contrib.auth import views as auth_views
|
||||
from django.urls import path, include
|
||||
from .settings import ALLOW_REGISTRATION
|
||||
|
||||
urlpatterns = [
|
||||
path('admin/', admin.site.urls),
|
||||
path('login/', auth_views.LoginView.as_view(redirect_authenticated_user=True), name='login'),
|
||||
path('login/', auth_views.LoginView.as_view(redirect_authenticated_user=True,
|
||||
extra_context=dict(allow_registration=ALLOW_REGISTRATION)),
|
||||
name='login'),
|
||||
path('logout/', auth_views.LogoutView.as_view(), name='logout'),
|
||||
path('', include('bookmarks.urls')),
|
||||
]
|
||||
|
||||
if ALLOW_REGISTRATION:
|
||||
urlpatterns.append(path('', include('django_registration.backends.one_step.urls')))
|
||||
|
Reference in New Issue
Block a user