Esempio n. 1
0
    return redirect(get_lms_dashboard_url())


admin.autodiscover()
admin.site.site_header = _('E-Commerce Service Administration')
admin.site.site_title = admin.site.site_header

# NOTE 1: Add our logout override first to ensure it is registered by Django as the actual logout view.
# NOTE 2: These same patterns are used for rest_framework's browseable API authentication links.
AUTH_URLS = [
    url(r'^logout/$', LogoutView.as_view(), name='logout'),
] + oauth2_urlpatterns

WELL_KNOWN_URLS = [
    url(r'^.well-known/apple-developer-merchantid-domain-association.txt$',
        ApplePayMerchantDomainAssociationView.as_view(),
        name='apple_pay_domain_association'),
]

urlpatterns = AUTH_URLS + WELL_KNOWN_URLS + [
    url(r'^admin/', admin.site.urls),
    url(r'^auto_auth/$', core_views.AutoAuth.as_view(), name='auto_auth'),
    url(r'^api-auth/', include((AUTH_URLS, 'rest_framework'))),
    url(r'^api-docs/',
        get_swagger_view(title='Ecommerce API'),
        name='api_docs'),
    url(r'^bff/', include(('ecommerce.bff.urls', 'bff'))),
    url(r'^courses/', include(('ecommerce.courses.urls', 'courses'))),
    url(r'^credit/', include(('ecommerce.credit.urls', 'credit'))),
    url(r'^coupons/', include(('ecommerce.coupons.urls', 'coupons'))),
    url(r'^enterprise/', include(('ecommerce.enterprise.urls', 'enterprise'))),
Esempio n. 2
0
    usually be after signing into the LMS.
    """
    return redirect(get_lms_dashboard_url())


admin.autodiscover()
admin.site.site_header = _('E-Commerce Service Administration')
admin.site.site_title = admin.site.site_header

# NOTE 1: Add our logout override first to ensure it is registered by Django as the actual logout view.
# NOTE 2: These same patterns are used for rest_framework's browseable API authentication links.
AUTH_URLS = [url(r'^logout/$', LogoutView.as_view(), name='logout'), ] + auth_urlpatterns

WELL_KNOWN_URLS = [
    url(r'^.well-known/apple-developer-merchantid-domain-association$',
        ApplePayMerchantDomainAssociationView.as_view(), name='apple_pay_domain_association'),
]

urlpatterns = AUTH_URLS + WELL_KNOWN_URLS + [
    url(r'^admin/', include(admin.site.urls)),
    url(r'^auto_auth/$', core_views.AutoAuth.as_view(), name='auto_auth'),
    url(r'^api-auth/', include(AUTH_URLS, namespace='rest_framework')),
    url(r'^api-docs/', include_docs_urls(title='Ecommerce API')),
    url(r'^courses/', include('ecommerce.courses.urls', namespace='courses')),
    url(r'^credit/', include('ecommerce.credit.urls', namespace='credit')),
    url(r'^coupons/', include('ecommerce.coupons.urls', namespace='coupons')),
    url(r'^health/$', core_views.health, name='health'),
    url(r'^i18n/', include('django.conf.urls.i18n')),
    url(r'^jsi18n/$', JavaScriptCatalog.as_view(packages=['courses']), name='javascript-catalog'),
    url(r'^management/', include('ecommerce.management.urls', namespace='management')),
    url(r'^programs/', include('ecommerce.programs.urls', namespace='programs')),