website/kumisystems/urls.py
Kumi 81115792b7
Add OIDC
Sample settings file
2023-07-08 16:51:05 +02:00

20 lines
No EOL
695 B
Python

from django.contrib import admin
from django.urls import path, include
from django.views.i18n import JavaScriptCatalog
from django.conf.urls.i18n import i18n_patterns
from django.conf import settings
urlpatterns = [
path("oidc/", include("mozilla_django_oidc.urls")),
] + i18n_patterns(
path("admin/", admin.site.urls),
path("", include("cms.urls")),
path("jsi18n/", JavaScriptCatalog.as_view(), name="javascript-catalog"),
)
if settings.USE_OIDC:
from mozilla_django_oidc.views import OIDCAuthenticationRequestView
urlpatterns = i18n_patterns(
path('admin/login/', OIDCAuthenticationRequestView.as_view(), name='oidc_authentication_init'),
) + urlpatterns