Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
La Quadrature du Net
Respect My Net
Commits
1a4e64f4
Commit
1a4e64f4
authored
Sep 01, 2012
by
stef
Browse files
[fix] redirect at confirmation
parent
8dd4af9c
Changes
1
Hide whitespace changes
Inline
Side-by-side
bt/views.py
View file @
1a4e64f4
...
...
@@ -111,11 +111,9 @@ def confirm(request, id, name=None):
try
:
c
=
Confirmation
(
key
=
actid
,
email
=
name
,
violation
=
Violation
.
objects
.
get
(
pk
=
id
))
except
:
messages
.
add_message
(
request
,
messages
.
INFO
,
unicode
(
_
(
'Thank you, this has been already confirmed'
)))
return
HttpResponseRedirect
(
'/'
)
# Redirect after POST
return
HttpResponse
(
unicode
(
_
(
'Thank you, this has been already confirmed'
)))
c
.
save
()
messages
.
add_message
(
request
,
messages
.
INFO
,
unicode
(
_
(
'Thank you for your confirmation'
)))
return
HttpResponseRedirect
(
'/'
)
# Redirect after POST
return
HttpResponse
(
unicode
(
_
(
'Thank you for your confirmation'
)))
try
:
c
=
get_object_or_404
(
Confirmation
,
key
=
id
)
except
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment