diff --git a/pandora/urls.py b/pandora/urls.py index 36e9e8f3..993dda65 100644 --- a/pandora/urls.py +++ b/pandora/urls.py @@ -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.*).json$', translation.views.locale_json), re_path(r'^api/upload/text/?$', text.views.upload), re_path(r'^api/upload/document/?$', document.views.upload),