Changeset View
Changeset View
Standalone View
Standalone View
swh/web/urls.py
Show First 20 Lines • Show All 41 Lines • ▼ Show 20 Lines | |||||
urlpatterns = [ | urlpatterns = [ | ||||
url(r"^admin/", include("swh.web.admin.urls")), | url(r"^admin/", include("swh.web.admin.urls")), | ||||
url(r"^favicon\.ico$", favicon_view), | url(r"^favicon\.ico$", favicon_view), | ||||
url(r"^api/", include("swh.web.api.urls")), | url(r"^api/", include("swh.web.api.urls")), | ||||
url(r"^browse/", include("swh.web.browse.urls")), | url(r"^browse/", include("swh.web.browse.urls")), | ||||
url(r"^$", _default_view, name="swh-web-homepage"), | url(r"^$", _default_view, name="swh-web-homepage"), | ||||
url(r"^jsreverse/$", urls_js, name="js_reverse"), | url(r"^jsreverse/$", urls_js, name="js_reverse"), | ||||
url( | |||||
r"^(?P<swhid>swh:[0-9]+:[a-z]+:[0-9a-f]+.*)$", | |||||
swhid_browse, | |||||
name="browse-swhid", | |||||
), | |||||
# keep legacy SWHID resolving URL with trailing slash for backward compatibility | # keep legacy SWHID resolving URL with trailing slash for backward compatibility | ||||
url( | url( | ||||
r"^(?P<swhid>swh:[0-9]+:[a-z]+:[0-9a-f]+.*)/$", | r"^(?P<swhid>swh:[0-9]+:[a-z]+:[0-9a-f]+.*)/$", | ||||
swhid_browse, | swhid_browse, | ||||
name="browse-swhid-legacy", | name="browse-swhid-legacy", | ||||
), | ), | ||||
url( | |||||
r"^(?P<swhid>swh:[0-9]+:[a-z]+:[0-9a-f]+.*)$", | |||||
swhid_browse, | |||||
name="browse-swhid", | |||||
), | |||||
url(r"^", include("swh.web.misc.urls")), | url(r"^", include("swh.web.misc.urls")), | ||||
url(r"^", include("swh.web.auth.views")), | url(r"^", include("swh.web.auth.views")), | ||||
url(r"^logout/$", LogoutView.as_view(template_name="logout.html"), name="logout"), | url(r"^logout/$", LogoutView.as_view(template_name="logout.html"), name="logout"), | ||||
] | ] | ||||
# allow to serve assets through django staticfiles | # allow to serve assets through django staticfiles | ||||
# even if settings.DEBUG is False | # even if settings.DEBUG is False | ||||
Show All 14 Lines |