Skip to content

Commit

Permalink
Use a better method for determining static file url. Make favicon red…
Browse files Browse the repository at this point in the history
…irect a public view
  • Loading branch information
jmcarson committed Nov 21, 2024
1 parent bd5f641 commit c406594
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions config/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@
"cdsa:records:user_access",
"dbgap:records:index",
"dbgap:records:applications",
"favicon",
]

# django-dbbackup
Expand Down
7 changes: 6 additions & 1 deletion config/urls.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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)


Expand Down

0 comments on commit c406594

Please sign in to comment.