X-Git-Url: http://git.cascardo.eti.br/?p=cascardo%2Feventmanager.git;a=blobdiff_plain;f=decorators.py;h=69181580fe0a338cc52bf37acf7022e73fd46eca;hp=079a4843eed64b96b1189621aca4d3e45dcba81b;hb=HEAD;hpb=937615436ceacf35c74375ffa2808045defb0a2c diff --git a/decorators.py b/decorators.py index 079a484..6918158 100644 --- a/decorators.py +++ b/decorators.py @@ -17,7 +17,10 @@ License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + Changes: + * Lincoln de Sousa (22 Jul 2007) adding is_login_form here. + """ from django.contrib.auth.forms import AuthenticationForm from django.contrib.auth import login @@ -40,10 +43,9 @@ def enable_login_form(func): request.session.delete_test_cookie() except KeyError: pass + return HttpResponseRedirect('/') else: - # TODO: Notify the user that data sent is wrong. - msg = _('User name and Password doesn\'t match') - request.error_message = msg + return HttpResponseRedirect('/?login_failed') request.session.set_test_cookie() return func(request, *args, **kwargs)