Skip to content

Instantly share code, notes, and snippets.

@heyost
Created August 23, 2017 09:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save heyost/d0d1fc26dd0dab9aa153d316497b41ff to your computer and use it in GitHub Desktop.
Save heyost/d0d1fc26dd0dab9aa153d316497b41ff to your computer and use it in GitHub Desktop.
Django favicon
# example using favicon on Django Admin
from django.conf.urls import url
from django.contrib import admin
from django.views.generic import RedirectView
from muhfajar.settings import STATIC_URL
urlpatterns = [
url(r'^favicon\.ico$', RedirectView.as_view(url=STATIC_URL + 'path_to_favicon.ico')),
url(r'^', admin.site.urls),
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment