changeset 360:db187729c40c

new style error display for login
author Marcin Kuzminski <marcin@python-works.com>
date Sat, 24 Jul 2010 00:53:03 +0200
parents 339d1368c10d
children 3581656180b7
files pylons_app/controllers/login.py
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/pylons_app/controllers/login.py	Sat Jul 24 00:51:57 2010 +0200
+++ b/pylons_app/controllers/login.py	Sat Jul 24 00:53:03 2010 +0200
@@ -2,7 +2,7 @@
 # encoding: utf-8
 # login controller for pylons
 # Copyright (C) 2009-2010 Marcin Kuzminski <marcin@python-works.com>
- 
+# 
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
 # as published by the Free Software Foundation; version 2
@@ -51,10 +51,11 @@
                 return redirect(url('hg_home'))
                                
             except formencode.Invalid as errors:
-                c.form_errors = errors.error_dict
                 return htmlfill.render(
                     render('/login.html'),
                     defaults=errors.value,
+                    errors=errors.error_dict or {},
+                    prefix_error=False,
                     encoding="UTF-8")
                         
         return render('/login.html')