Skip to content

Instantly share code, notes, and snippets.

@mikeyakymenko
Created September 19, 2012 19:55
Show Gist options
  • Save mikeyakymenko/3751852 to your computer and use it in GitHub Desktop.
Save mikeyakymenko/3751852 to your computer and use it in GitHub Desktop.
Favicon
<link rel="shortcut icon" href="/path/to/favicon.ico" />
urlpatterns = patterns('',
(r'^favicon.ico$', 'django.views.static.serve',
{'document_root': settings.STATIC_ROOT, 'path': "favicon.ico"}),
)
from django.views.generic.base import TemplateView, RedirectView
urlpatterns = patterns('',
url(r'^favicon\.ico$', RedirectView.as_view(url='/path/to/favicon.ico')),
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment