only add oidc urls if oidc is enabled
This commit is contained in:
parent
34af2b1fab
commit
ff236e8828
1 changed files with 7 additions and 3 deletions
|
@ -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),
|
||||
|
||||
]
|
||||
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),
|
||||
|
|
Loading…
Reference in a new issue