Commit 8d706eb0 authored by Valéry Febvre's avatar Valéry Febvre

Code cleanup

parent f3189cf8
......@@ -47,8 +47,6 @@ from pyramid.view import view_config
from passim.views.common import ensure_method
from passim.views.common import parse_last_update
from pprint import pprint
log = logging.getLogger(__name__)
......@@ -56,19 +54,9 @@ log = logging.getLogger(__name__)
def error_403(request):
_ = request.translate
request.response.status_int = 403
breadcrumb = [
(_(u'Access denied'), None),
]
if request.authenticated_user is not None:
# Add authenticated_user to a new session because a rollback
# has been issued by transaction manager
DBSession.add(request.authenticated_user)
return dict(
breadcrumb=breadcrumb,
subtitle=None,
title=_(u'403 Forbidden'),
title=_(u'Access denied'),
)
......@@ -76,19 +64,9 @@ def error_403(request):
def error_404(request):
_ = request.translate
request.response.status_int = 404
breadcrumb = [
(_(u'Page not found'), None),
]
if request.authenticated_user is not None:
# Add authenticated_user to a new session because a rollback
# has been issued by transaction manager
DBSession.add(request.authenticated_user)
return dict(
breadcrumb=breadcrumb,
subtitle=None,
title=_(u'404 Error Page'),
title=_(u'Page not found'),
)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment