fix: Handle favicon.ico URL pattern correctly

This commit is contained in:
Lord_Devi 2024-09-20 18:34:20 -04:00
parent 233b2b3db6
commit d4e624d5d7

View file

@ -14,5 +14,5 @@ from django.urls import re_path
if settings.DEBUG:
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
urlpatterns += [
re_path(r'^favicon\.ico$', RedirectView.as_view(url=settings.STATIC_URL + 'favicon-32x32.png', permanent=True), name='favicon'),
path('favicon.ico', RedirectView.as_view(url=settings.STATIC_URL + 'favicon-32x32.png', permanent=True), name='favicon'),
]