diff --git a/config/settings/base.py b/config/settings/base.py index 3f2c24d9..7c7410a4 100644 --- a/config/settings/base.py +++ b/config/settings/base.py @@ -310,6 +310,7 @@ "cdsa:records:user_access", "dbgap:records:index", "dbgap:records:applications", + "favicon", ] # django-dbbackup diff --git a/config/urls.py b/config/urls.py index ce11199f..9d82035d 100644 --- a/config/urls.py +++ b/config/urls.py @@ -1,6 +1,7 @@ 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 @@ -27,7 +28,11 @@ "collaborative_analysis/", include("primed.collaborative_analysis.urls", namespace="collaborative_analysis"), ), - path("favicon.ico", RedirectView.as_view(url="/static/images/favicons/primed-favicon.png", permanent=True)), + path( + "favicon.ico", + RedirectView.as_view(url=static_url_tag("images/favicons/primed-favicon.png"), permanent=True), + name="favicon", + ), ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)