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

urlpatterns = patterns('',
    url(r'^favicon\.ico$', 'django.views.generic.simple.redirect_to', {'url': conf.FAVICON_PATH}, name='favicon'),
)
from django.conf.urls import patterns, url
from django.views.generic import TemplateView, RedirectView
import conf

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

Use RedirectView in urlpatterns (needed for Django 1.5)