Changeset View
Changeset View
Standalone View
Standalone View
swh/web/urls.py
Show All 32 Lines | |||||
swh_web_config = get_config() | swh_web_config = get_config() | ||||
favicon_view = RedirectView.as_view( | favicon_view = RedirectView.as_view( | ||||
url="/static/img/icons/swh-logo-32x32.png", permanent=True | url="/static/img/icons/swh-logo-32x32.png", permanent=True | ||||
) | ) | ||||
def _default_view(request): | def _default_view(request): | ||||
return render( | return render(request, "homepage.html", {"visit_types": origin_visit_types()}) | ||||
request, | |||||
"homepage.html", | |||||
{ | |||||
"enable_ql": swh_web_config["search_config"].get("enable_ql", False), | |||||
"visit_types": origin_visit_types(), | |||||
}, | |||||
) | |||||
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"), | ||||
Show All 34 Lines |