Пример #1
0
    # legacy logo url redirect
    url(r'^static/images/header-logo-120.png$', RedirectView.as_view(url='{}images/logo.png'.format(settings.STATIC_URL), permanent=True)),

    # Apple app universal URL endpoint
    url(r'^apple-app-site-association', AppleAppSiteAssociation.as_view(), name="apple-app-site-association"),

    # OAuth2 provider URLs
    url(r'^o/authorize/?$', AuthorizationApiView.as_view(), name='oauth2_api_authorize'),
    url(r'^o/token/?$', TokenView.as_view(), name='oauth2_provider_token'),
    url(r'^o/code/?$', AuthCodeExchange.as_view(), name='oauth2_code_exchange'),
    url(r'^o/', include('oauth2_provider.urls', namespace='oauth2_provider')),

    # Home
    url(r'^$', info_view, name='index'),
    url(r'^accounts/login/$', RedirectToUiLogin.as_view(), name='legacy_login_redirect'),

    # Admin URLs
    url(r'^staff/sidewide-actions$', SitewideActionFormView.as_view(), name='badgr_admin_sitewide_actions'),
    url(r'^staff/', include(badgr_admin.urls)),

    # Service health endpoint
    url(r'^health', include('health.urls')),

    # Swagger Docs
    #
    # api docs
    #
    url(r'^docs/oauth2/authorize$', DocsAuthorizeRedirect.as_view(), name='docs_authorize_redirect'),
    url(r'^docs/?$', RedirectView.as_view(url='/docs/v2/', permanent=True)),  # default redirect to /v2/
    url(r'^docs/', include('apispec_drf.urls')),
Пример #2
0
    # Apple app universal URL endpoint
    url(r'^apple-app-site-association',
        AppleAppSiteAssociation.as_view(),
        name="apple-app-site-association"),

    # OAuth2 provider URLs
    url(r'^o/authorize/?$',
        AuthorizationApiView.as_view(),
        name='oauth2_api_authorize'),
    url(r'^o/token/?$', TokenView.as_view(), name='oauth2_provider_token'),
    url(r'^o/', include('oauth2_provider.urls', namespace='oauth2_provider')),

    # Home
    url(r'^$', info_view, name='index'),
    url(r'^accounts/login/$',
        RedirectToUiLogin.as_view(),
        name='legacy_login_redirect'),

    # Admin URLs
    url(r'^staff/sidewide-actions$',
        SitewideActionFormView.as_view(),
        name='badgr_admin_sitewide_actions'),
    url(r'^staff/', include(badgr_admin.urls)),

    # Service health endpoint
    url(r'^health', include('health.urls')),

    # Swagger Docs
    #
    # api docs
    #