Beispiel #1
0
def get_urls():
    urls = []
    urls.extend(get_module_urls())

    urls.extend([
        admin_url(r'^$', DashboardView.as_view(), name='dashboard'),
        admin_url(r'^search/$', SearchView.as_view(), name='search'),
        admin_url(r'^select/$', MultiselectAjaxView.as_view(), name='select'),
        admin_url(r'^menu/$', MenuView.as_view(), name='menu'),
        admin_url(r'^login/$',
                  login,
                  kwargs={"template_name": "shoop/admin/auth/login.jinja"},
                  name='login',
                  require_authentication=False),
        admin_url(r'^logout/$',
                  auth_views.logout,
                  kwargs={"template_name": "shoop/admin/auth/logout.jinja"},
                  name='logout',
                  require_authentication=False),
        admin_url(r'^set-language/$',
                  csrf_exempt(set_language),
                  name="set-language"),
    ])

    for u in urls:  # pragma: no cover
        if not isinstance(u, AdminRegexURLPattern):
            warnings.warn("Admin URL %r is not an AdminRegexURLPattern" % u)

    # Add Django javascript catalog url
    urls.append(url(r'^i18n.js$', javascript_catalog_all, name='js-catalog'))

    return tuple(urls)
Beispiel #2
0
def get_urls():
    urls = []
    urls.extend(get_module_urls())

    urls.extend(
        [
            admin_url(r"^$", DashboardView.as_view(), name="dashboard"),
            admin_url(r"^search/$", SearchView.as_view(), name="search"),
            admin_url(r"^menu/$", MenuView.as_view(), name="menu"),
            admin_url(
                r"^login/$",
                login,
                kwargs={"template_name": "shoop/admin/auth/login.jinja"},
                name="login",
                require_authentication=False,
            ),
            admin_url(
                r"^logout/$",
                auth_views.logout,
                kwargs={"template_name": "shoop/admin/auth/logout.jinja"},
                name="logout",
                require_authentication=False,
            ),
            admin_url(r"^set-language/$", csrf_exempt(set_language), name="set-language"),
        ]
    )

    for u in urls:  # pragma: no cover
        if not isinstance(u, AdminRegexURLPattern):
            warnings.warn("Admin URL %r is not an AdminRegexURLPattern" % u)

    # Add Django javascript catalog url
    urls.append(url(r"^i18n.js$", javascript_catalog_all, name="js-catalog"))

    return tuple(urls)
Beispiel #3
0
def get_urls():
    urls = []
    urls.extend(get_module_urls())

    urls.extend([
        admin_url(r'^$', DashboardView.as_view(), name='dashboard'),
        admin_url(r'^search/$', SearchView.as_view(), name='search'),
        admin_url(r'^menu/$', MenuView.as_view(), name='menu'),
        admin_url(r'^login/$',
                  login,
                  kwargs={"template_name": "shoop/admin/auth/login.jinja"},
                  name='login',
                  require_authentication=False),
        admin_url(r'^logout/$',
                  auth_views.logout,
                  kwargs={"template_name": "shoop/admin/auth/logout.jinja"},
                  name='logout',
                  require_authentication=False),
    ])

    for u in urls:  # pragma: no cover
        if not isinstance(u, AdminRegexURLPattern):
            warnings.warn("Admin URL %r is not an AdminRegexURLPattern" % u)

    return tuple(urls)
Beispiel #4
0
def get_urls():
    urls = []
    urls.extend(get_module_urls())

    urls.extend([
        admin_url(r'^$', DashboardView.as_view(), name='dashboard'),
        admin_url(r'^search/$', SearchView.as_view(), name='search'),
        admin_url(r'^menu/$', MenuView.as_view(), name='menu'),
        admin_url(
            r'^login/$',
            login,
            kwargs={"template_name": "shoop/admin/auth/login.jinja"},
            name='login',
            require_authentication=False
        ),
        admin_url(
            r'^logout/$',
            auth_views.logout,
            kwargs={"template_name": "shoop/admin/auth/logout.jinja"},
            name='logout',
            require_authentication=False
        ),
    ])

    for u in urls:  # pragma: no cover
        if not isinstance(u, AdminRegexURLPattern):
            warnings.warn("Admin URL %r is not an AdminRegexURLPattern" % u)

    # Add Django javascript catalog url
    urls.append(url(r'^jsi18n.js$', javascript_catalog, {'packages': ('shoop',)}, name='js-catalog'))

    return tuple(urls)