Exemplo n.º 1
0
from django.urls import path, include
from .views import *
from rest_framework_jwt.views import obtain_jwt_token

from django_cas_ng.views import LoginView
# from .cas_wrapper import APILoginView, APILogoutView

app_name = 'sso'

urlpatterns = [
    path('login/', LoginView.as_view(), name='login'),
    path('logout/', APILogoutView.as_view(), name='logout'),
    path('token-auth/', obtain_jwt_token),
    path('profile/', ProfileDashboardView.as_view(), name='profile'),
    path("halo/", halo, name="halo"),
]
Exemplo n.º 2
0
from django.conf.urls import url
from django_cas_ng.views import LoginView, LogoutView, CallbackView

urlpatterns = [
    url(r'^login/$', LoginView.as_view(), name='cas_ng_login'),
    url(r'^logout/$', LogoutView.as_view(), name='cas_ng_logout'),
    url(r'^callback/$', CallbackView.as_view(), name='cas_ng_proxy_callback'),
]
Exemplo n.º 3
0
from wagtail.contrib.sitemaps.views import sitemap
from wagtail.core import urls as wagtail_urls

admin.site.site_header = 'CCA Libraries Administration'
admin.autodiscover()

urlpatterns = [
    path('django-admin/', admin.site.urls),
    # override Wagtail document handling — send file, not a forced download
    path('documents/<int:document_id>/<document_filename>',
         serve_wagtail_doc,
         name='wagtaildocs_serve'),

    # CAS login urls
    # NOTE: ^admin/logout/$ must appear before ^admin/ or it's impossible to logout
    path('login/', LoginView.as_view(), name='cas_ng_login'),
    path('admin/login/', LoginView.as_view()),
    path('admin/logout/', LogoutView.as_view(), name='cas_ng_logout'),
    path('admin/', include(wagtailadmin_urls)),
    # @TODO can we do this using just Wagtail REST APIs instead of Django REST framework?
    path('api/v2/', api_router.urls),
    path('api/v1/', include('alerts.urls')),
    path('search/', search_views.search, name='search'),
    path('hours/', hours_views.hours, name='hours'),

    # Summon "broken links" app
    path('brokenlinks/', brokenlinks_views.brokenlinks, name='brokenlinks'),

    # Serials Solution API proxy
    path('sersol/', sersol_views.sersol, name='sersol_api'),