Show More
@@ -32,6 +32,7 b' from pyramid.static import static_view' | |||||
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 | |
|
35 | from pylons.controllers.util import abort, redirect | |||
35 | import pyramid.httpexceptions as httpexceptions |
|
36 | import pyramid.httpexceptions as httpexceptions | |
36 | from pyramid.renderers import render_to_response, render |
|
37 | from pyramid.renderers import render_to_response, render | |
37 | from routes.middleware import RoutesMiddleware |
|
38 | from routes.middleware import RoutesMiddleware | |
@@ -291,6 +292,13 b' def includeme_last(config):' | |||||
291 | settings = config.registry.settings |
|
292 | settings = config.registry.settings | |
292 | config.add_static_view('_static', path='rhodecode:public') |
|
293 | config.add_static_view('_static', path='rhodecode:public') | |
293 |
|
294 | |||
|
295 | # redirect automatic browser favicon.ico requests to correct place | |||
|
296 | def favicon_redirect(context, request): | |||
|
297 | return redirect( | |||
|
298 | request.static_url('rhodecode:public/images/favicon.ico')) | |||
|
299 | config.add_view(favicon_redirect, route_name='favicon') | |||
|
300 | config.add_route('favicon', '/favicon.ico') | |||
|
301 | ||||
294 |
|
302 | |||
295 | def wrap_app_in_wsgi_middlewares(pyramid_app, config): |
|
303 | def wrap_app_in_wsgi_middlewares(pyramid_app, config): | |
296 | """ |
|
304 | """ |
General Comments 0
You need to be logged in to leave comments.
Login now