diff --git a/config/settings/base.py b/config/settings/base.py index f62767cc..08ed3bcf 100644 --- a/config/settings/base.py +++ b/config/settings/base.py @@ -298,6 +298,7 @@ "socialaccount_signup", "admin:index", "admin:login", + "favicon", ] # django-dbbackup diff --git a/config/urls.py b/config/urls.py index c5982f85..df1659ca 100644 --- a/config/urls.py +++ b/config/urls.py @@ -1,9 +1,11 @@ from django.conf import settings from django.conf.urls.static import static from django.contrib import admin +from django.templatetags.static import static as static_url_tag from django.urls import include, path from django.views import defaults as default_views from django.views.generic import TemplateView +from django.views.generic.base import RedirectView urlpatterns = [ path("", TemplateView.as_view(template_name="pages/home.html"), name="home"), @@ -22,6 +24,11 @@ "gregor_anvil/", include("gregor_django.gregor_anvil.urls", namespace="gregor_anvil"), ), + path( + "favicon.ico", + RedirectView.as_view(url=static_url_tag("images/favicons/favicon_1.jpg"), permanent=True), + name="favicon", + ), ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)