##// END OF EJS Templates
assets: use pyramid redirect instead of pylons for favion.ico route
dan -
r620:ea19daa6 default
parent child Browse files
Show More
@@ -31,8 +31,7 b' from pyramid.authorization import ACLAut'
31 from pyramid.config import Configurator
31 from pyramid.config import Configurator
32 from pyramid.settings import asbool, aslist
32 from pyramid.settings import asbool, aslist
33 from pyramid.wsgi import wsgiapp
33 from pyramid.wsgi import wsgiapp
34 from pyramid.httpexceptions import HTTPError, HTTPInternalServerError
34 from pyramid.httpexceptions import HTTPError, HTTPInternalServerError, HTTPFound
35 from pylons.controllers.util import redirect
36 from pyramid.events import ApplicationCreated
35 from pyramid.events import ApplicationCreated
37 import pyramid.httpexceptions as httpexceptions
36 import pyramid.httpexceptions as httpexceptions
38 from pyramid.renderers import render_to_response
37 from pyramid.renderers import render_to_response
@@ -339,7 +338,7 b' def includeme(config):'
339 def includeme_first(config):
338 def includeme_first(config):
340 # redirect automatic browser favicon.ico requests to correct place
339 # redirect automatic browser favicon.ico requests to correct place
341 def favicon_redirect(context, request):
340 def favicon_redirect(context, request):
342 return redirect(
341 return HTTPFound(
343 request.static_path('rhodecode:public/images/favicon.ico'))
342 request.static_path('rhodecode:public/images/favicon.ico'))
344
343
345 config.add_view(favicon_redirect, route_name='favicon')
344 config.add_view(favicon_redirect, route_name='favicon')
General Comments 0
You need to be logged in to leave comments. Login now