]> git.openstreetmap.org Git - osqa.git/commitdiff
Show template except the 404 error.
authorjordan <jordan@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Mon, 27 Dec 2010 20:39:21 +0000 (20:39 +0000)
committerjordan <jordan@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Mon, 27 Dec 2010 20:39:21 +0000 (20:39 +0000)
git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@634 0cfe37f9-358a-4d5e-be75-b63607b5c754

forum/skins/default/media/style/style.css
forum/skins/default/templates/auth/mail_already_validated.html [new file with mode: 0644]
forum/views/auth.py

index 88815c4eeb15268e68dda1d3a0116f331d7edc73..15155f4727205f40c29eccc42f2067b99a34dea8 100644 (file)
@@ -919,7 +919,7 @@ span.form-error {
 }
 
 .revision .summary span {
 }
 
 .revision .summary span {
-    /**background-color: yellow;/**/
+    /**background-color: yellow;**/
     display: inline;
     padding-left: 3px;
     padding-right: 3px;
     display: inline;
     padding-left: 3px;
     padding-right: 3px;
@@ -1817,4 +1817,4 @@ div.wmd-button {
 }
 div.wmd-button-bar {
     float:left;
 }
 div.wmd-button-bar {
     float:left;
-}
\ No newline at end of file
+}
diff --git a/forum/skins/default/templates/auth/mail_already_validated.html b/forum/skins/default/templates/auth/mail_already_validated.html
new file mode 100644 (file)
index 0000000..dd37fa3
--- /dev/null
@@ -0,0 +1,17 @@
+{% extends "base_content.html" %}
+<!-- complete.html -->
+{% load i18n %}
+{% block head %}{% endblock %}
+{% block title %}{% spaceless %}{% trans "This e-mail has already been validated" %}{% endspaceless %}{% endblock %}
+{% block content %}
+
+<div class="error">
+
+<h1>{% blocktrans %}Already validated{% endblocktrans %}</h1>
+
+<p>{% blocktrans %}This e-mail has already been validated{% endblocktrans %}</p>
+
+</div>
+
+{% endblock %}
+<!-- end complete.html -->
index abbbc31c890d2f10b10ecad68aea0e723af91e21..6134d124b2fd390f5657b69a18c5893e4f4bfc41 100644 (file)
@@ -289,7 +289,7 @@ def validate_email(request, user, code):
         user.save()
         return login_and_forward(request, user, reverse('index'), _("Thank you, your email is now validated."))
     else:
         user.save()
         return login_and_forward(request, user, reverse('index'), _("Thank you, your email is now validated."))
     else:
-        raise Http404()
+        return render_to_response('auth/mail_already_validated.html', { 'user' : user }, RequestContext(request))
 
 def auth_settings(request, id):
     user_ = get_object_or_404(User, id=id)
 
 def auth_settings(request, id):
     user_ = get_object_or_404(User, id=id)
@@ -405,4 +405,4 @@ def forward_suspended_user(request, user, show_private_msg=True):
 @decorate.withfn(login_required)
 def signout(request):
     logout(request)
 @decorate.withfn(login_required)
 def signout(request):
     logout(request)
-    return HttpResponseRedirect(reverse('index'))
\ No newline at end of file
+    return HttpResponseRedirect(reverse('index'))