support favicon.ico on root
This commit is contained in:
parent
92a8b0951e
commit
1fed0f63d0
1 changed files with 6 additions and 0 deletions
|
@ -6,6 +6,7 @@ from django.shortcuts import render
|
|||
from django.urls import path, include
|
||||
from django.contrib.sitemaps.views import sitemap
|
||||
from django.http import HttpResponse
|
||||
from django.views.generic.base import RedirectView
|
||||
|
||||
|
||||
from hub.services.views.errors import bad_request, page_not_found, server_error
|
||||
|
@ -49,6 +50,11 @@ urlpatterns = [
|
|||
name="django.contrib.sitemaps.views.sitemap",
|
||||
),
|
||||
path("robots.txt", robots_txt, name="robots_txt"),
|
||||
path(
|
||||
"favicon.ico",
|
||||
RedirectView.as_view(url=settings.STATIC_URL + "img/favicon.ico"),
|
||||
name="favicon",
|
||||
),
|
||||
]
|
||||
if settings.DEBUG:
|
||||
urlpatterns += [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue