only add oidc urls if oidc is enabled

This commit is contained in:
j 2024-11-08 12:47:47 +00:00
parent 34af2b1fab
commit ff236e8828

View file

@ -33,11 +33,15 @@ import urlalias.views
def serve_static_file(path, location, content_type):
return HttpFileResponse(location, content_type=content_type)
urlpatterns = [
#path('admin/', admin.site.urls),
path('oidc/', include('mozilla_django_oidc.urls')),
]
if settings.OIDC_RP_CLIENT_ID:
urlpatterns += [
path('oidc/', include('mozilla_django_oidc.urls')),
]
urlpatterns += [
re_path(r'^api/locale.(?P<lang>.*).json$', translation.views.locale_json),
re_path(r'^api/upload/text/?$', text.views.upload),
re_path(r'^api/upload/document/?$', document.views.upload),