Revision 4f9d6461
Correction du base_url
git-svn-id: https://vigilo-dev.si.c-s.fr/svn@299 b22e2e97-25c9-44ff-b637-2e5ceca36478
vigiboard/controllers/vigiboard_ctl/vigiboard_ctl.py | ||
---|---|---|
47 | 47 |
redirect(request.environ.get('HTTP_REFERER' |
48 | 48 |
).split(request.environ.get('HTTP_HOST'))[1]) |
49 | 49 |
else : |
50 |
redirect('/vigiboard')
|
|
50 |
redirect('/') |
|
51 | 51 |
|
52 | 52 |
@validate(validators={'page':validators.Int(not_empty=False)}, |
53 | 53 |
error_handler=process_form_errors) |
... | ... | |
209 | 209 |
# Vérification que l'évènement existe |
210 | 210 |
if events.num_rows() != 1 : |
211 | 211 |
flash(_('Error in DB'), 'error') |
212 |
redirect('/vigiboard')
|
|
212 |
redirect('/') |
|
213 | 213 |
|
214 | 214 |
events.format_events(0, 1) |
215 | 215 |
events.format_history() |
... | ... | |
248 | 248 |
|
249 | 249 |
# Vérification qu'il y a au moins 1 évènement qui correspond |
250 | 250 |
if events.num_rows() == 0 : |
251 |
redirect('/vigiboard')
|
|
251 |
redirect('/') |
|
252 | 252 |
|
253 | 253 |
events.format_events(0, events.num_rows()) |
254 | 254 |
events.format_history() |
... | ... | |
266 | 266 |
hist_error = True |
267 | 267 |
) |
268 | 268 |
|
269 |
@expose('vigiboard.templates.vigiboard_update') |
|
270 | 269 |
@validate(validators={ |
271 | 270 |
"id":validators.Regex(r'^[0-9]+(,[0-9]*)*,?$'), |
272 | 271 |
"trouble_ticket":validators.Regex(r'^[0-9]*$'), |
... | ... | |
299 | 298 |
# Vérification que au moins un des identifiants existe et est éditable |
300 | 299 |
if events.num_rows() <= 0 : |
301 | 300 |
flash(_('No access to this event'), 'error') |
302 |
redirect('/vigiboard')
|
|
301 |
redirect('/') |
|
303 | 302 |
|
304 | 303 |
# Modification des évènements et création d'un historique |
305 | 304 |
# pour chacun d'eux |
... | ... | |
323 | 322 |
DBSession.add(history) |
324 | 323 |
|
325 | 324 |
flash(_('Updated successfully')) |
326 |
|
|
327 |
# Redirection vers la dernière page accédée |
|
325 |
# Redirection vers la dernière page accédée |
|
328 | 326 |
redirect(request.environ.get('HTTP_REFERER').split( |
329 |
request.environ.get('HTTP_HOST'))[1]) |
|
327 |
request.environ.get('HTTP_HOST')+tg.config['base_url_filter.base_url'])[1])
|
|
330 | 328 |
|
Also available in: Unified diff