from django.conf.urls import patterns, url
from django.views.generic import TemplateView, RedirectView
from . import conf

urlpatterns = patterns('',
    url(r'^favicon\.ico$', RedirectView.as_view(url=conf.FAVICON_PATH, permanent=True), name='favicon'),
)

from django.conf.urls import url
from django.views.generic import TemplateView, RedirectView
from . import conf

urlpatterns = [
    url(r'^favicon\.ico$', RedirectView.as_view(url=conf.FAVICON_PATH, permanent=True), name='favicon'),
]

fix django 1.10