Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
piks3l
Respect My Net
Commits
e201a321
Commit
e201a321
authored
Sep 24, 2011
by
stef
Browse files
[fix] 404 on already confirmed
parent
e68a234b
Changes
1
Hide whitespace changes
Inline
Side-by-side
bt/views.py
View file @
e201a321
...
...
@@ -97,10 +97,12 @@ def confirm(request, id, name=None):
return
HttpResponse
(
unicode
(
_
(
"Thank you, this has been already confirmed"
)))
c
.
save
()
return
HttpResponse
(
'<div class="confirm_thanks">%s</div>'
%
unicode
(
_
(
'Thank you for your confirmation'
))
)
c
=
Confirmation
.
objects
.
get
(
key
=
id
)
if
c
:
c
.
key
=
''
c
.
save
()
try
:
c
=
get_object_or_404
(
Confirmation
,
key
=
id
)
except
:
return
HttpResponse
(
unicode
(
_
(
"Thank you, this has been already confirmed"
)))
c
.
key
=
''
c
.
save
()
messages
.
add_message
(
request
,
messages
.
INFO
,
unicode
(
_
(
'Thank you for verifying your confirmation'
)))
return
HttpResponseRedirect
(
'/'
)
# Redirect after POST
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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