瀏覽代碼

Fix auth redirect

master
tr4ck3ur des JM2L 9 年之前
父節點
當前提交
d393d09715
共有 3 個文件被更改,包括 4 次插入4 次删除
  1. +1
    -1
      jm2l/auth.py
  2. +2
    -2
      jm2l/templates/list_tiers.mako
  3. +1
    -1
      jm2l/views.py

+ 1
- 1
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)



+ 2
- 2
jm2l/templates/list_tiers.mako 查看文件

@@ -37,11 +37,11 @@
<td style="position: relative;">
${Entity_Type}, ${entity.get_entity_type.entity_subtype}<br>
<strong>
<a href="/entity/${entity.get_entity_type.entity_type}/${entity.slug}">${entity.name}</a>
<a href="/entity/${entity.get_entity_type.slug_entity_type}/${entity.slug}">${entity.name}</a>
</strong>
% if request.user and request.user.Staff:
<span style="float:right;">
<a href="/entity/${entity.get_entity_type.entity_type}/${entity.slug}/edit">edit</a>
<a href="/entity/${entity.get_entity_type.slug_entity_type}/${entity.slug}/edit">edit</a>
</span>
% endif
</td>


+ 1
- 1
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):


Loading…
取消
儲存