20 lines
No EOL
695 B
Python
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 |