Changeset View
Changeset View
Standalone View
Standalone View
swh/web/urls.py
Show All 15 Lines | |||||
from django.contrib.auth.views import LogoutView | from django.contrib.auth.views import LogoutView | ||||
from django.contrib.staticfiles.views import serve | from django.contrib.staticfiles.views import serve | ||||
from django.shortcuts import render | from django.shortcuts import render | ||||
from django.views.generic.base import RedirectView | from django.views.generic.base import RedirectView | ||||
from django_js_reverse.views import urls_js | from django_js_reverse.views import urls_js | ||||
from swh.web.browse.identifiers import swh_id_browse | from swh.web.browse.identifiers import swhid_browse | ||||
from swh.web.config import get_config | from swh.web.config import get_config | ||||
from swh.web.common.exc import ( | from swh.web.common.exc import ( | ||||
swh_handle400, | swh_handle400, | ||||
swh_handle403, | swh_handle403, | ||||
swh_handle404, | swh_handle404, | ||||
swh_handle500, | swh_handle500, | ||||
) | ) | ||||
Show All 11 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( | url( | ||||
r"^(?P<swh_id>swh:[0-9]+:[a-z]+:[0-9a-f]+.*)/$", | r"^(?P<swhid>swh:[0-9]+:[a-z]+:[0-9a-f]+.*)/$", | ||||
swh_id_browse, | swhid_browse, | ||||
name="browse-swh-id", | 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 | ||||
Show All 15 Lines |