Mercurial > agora
changeset 169:9565b494b989
Merge Jordi's changes
author | dellsystem <ilostwaldo@gmail.com> |
---|---|
date | Sat, 20 Oct 2012 00:19:52 -0400 |
parents | c494e6ecff58 (diff) d31b236ed5cf (current diff) |
children | 3be23e2e8fe7 |
files | |
diffstat | 1 files changed, 10 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/views.py Wed Oct 17 10:33:03 2012 -0400 +++ b/views.py Sat Oct 20 00:19:52 2012 -0400 @@ -33,9 +33,17 @@ if username and password: user = authenticate(username=username, password=password) - login(request, user) + + if user is not None: + login(request, user) + return redirect(next_url) - return redirect(next_url) + # Could not authenticate + form = { + 'username': { + 'errors': 'Your username and password did not match.', + } + } else: form = { 'password1': {