Commit 1a4e64f4 authored by stef's avatar stef
Browse files

[fix] redirect at confirmation

parent 8dd4af9c
...@@ -111,11 +111,9 @@ def confirm(request, id, name=None): ...@@ -111,11 +111,9 @@ def confirm(request, id, name=None):
try: try:
c=Confirmation(key=actid, email=name, violation=Violation.objects.get(pk=id)) c=Confirmation(key=actid, email=name, violation=Violation.objects.get(pk=id))
except: except:
messages.add_message(request, messages.INFO, unicode(_('Thank you, this has been already confirmed'))) return HttpResponse(unicode(_('Thank you, this has been already confirmed')))
return HttpResponseRedirect('/') # Redirect after POST
c.save() c.save()
messages.add_message(request, messages.INFO, unicode(_('Thank you for your confirmation'))) return HttpResponse(unicode(_('Thank you for your confirmation')))
return HttpResponseRedirect('/') # Redirect after POST
try: try:
c = get_object_or_404(Confirmation, key=id) c = get_object_or_404(Confirmation, key=id)
except: except:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment