From d393d097152a3ec8c7770378a729e9ad55008102 Mon Sep 17 00:00:00 2001 From: tr4ck3ur Date: Mon, 6 Apr 2015 19:10:56 +0200 Subject: [PATCH] Fix auth redirect --- jm2l/auth.py | 2 +- jm2l/templates/list_tiers.mako | 4 ++-- jm2l/views.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/jm2l/auth.py b/jm2l/auth.py index 75cfd34..b377c50 100644 --- a/jm2l/auth.py +++ b/jm2l/auth.py @@ -87,7 +87,7 @@ def sign_in_out(request): request.session.flash(('error',u'Vous avez entré un mauvais couple identifiant/password !')) return HTTPFound(location="/sign/login", headers=headers) - return HTTPFound(location=request.route_url('home'), + return HTTPFound(location=request.route_url('home', year=''), headers=headers) diff --git a/jm2l/templates/list_tiers.mako b/jm2l/templates/list_tiers.mako index f96de76..baa4f7d 100644 --- a/jm2l/templates/list_tiers.mako +++ b/jm2l/templates/list_tiers.mako @@ -37,11 +37,11 @@ ${Entity_Type}, ${entity.get_entity_type.entity_subtype}
- ${entity.name} + ${entity.name} % if request.user and request.user.Staff: - edit + edit % endif diff --git a/jm2l/views.py b/jm2l/views.py index b7d8fe3..d0f538d 100644 --- a/jm2l/views.py +++ b/jm2l/views.py @@ -887,7 +887,7 @@ def change_year(request): if year>-1: session['year'] = year return HTTPFound(location='/%s/' % year) - return HTTPFound(location=request.route_url('home')) + return HTTPFound(location=request.route_url('home', year='')) @view_config(route_name='pict_user', renderer="jm2l:templates/Profil/pict_user.mako") def pict_user(request):