This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
authentik/passbook/core/urls.py

37 lines
1.3 KiB
Python
Raw Normal View History

2018-11-11 12:41:48 +00:00
"""passbook URL Configuration"""
from django.conf import settings
from django.contrib import admin
from django.urls import include, path
from django.views.generic import RedirectView
from passbook.core.views import authentication, overview
admin.autodiscover()
2018-11-16 08:10:35 +00:00
admin.site.login = RedirectView.as_view(pattern_name='passbook_core:auth-login')
2018-11-11 12:41:48 +00:00
2018-11-16 08:10:35 +00:00
core_urls = [
2018-11-11 12:41:48 +00:00
path('auth/login/', authentication.LoginView.as_view(), name='auth-login'),
path('', overview.OverviewView.as_view(), name='overview'),
2018-11-16 08:10:35 +00:00
]
urlpatterns = [
# Core
path('', include((core_urls, 'passbook_core'), namespace='passbook_core')),
2018-11-11 12:41:48 +00:00
# Administration
path('administration/django/', admin.site.urls),
2018-11-16 08:10:35 +00:00
path('administration/',
include(('passbook.admin.urls', 'passbook_admin'), namespace='passbook_admin')),
path('source/oauth/', include(('passbook.oauth_client.urls',
'passbook_oauth_client'), namespace='passbook_oauth_client')),
path('application/oauth', include(('passbook.oauth_provider.urls',
'passbook_oauth_provider'),
namespace='passbook_oauth_provider')),
2018-11-11 12:41:48 +00:00
]
if settings.DEBUG:
import debug_toolbar
urlpatterns = [
path('__debug__/', include(debug_toolbar.urls)),
] + urlpatterns