From: jordan Date: Mon, 27 Dec 2010 20:39:21 +0000 (+0000) Subject: Show template except the 404 error. X-Git-Tag: live~500 X-Git-Url: https://git.openstreetmap.org./osqa.git/commitdiff_plain/59609d6aa733bccba8f4e76ea916071813323fb4?ds=sidebyside Show template except the 404 error. git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@634 0cfe37f9-358a-4d5e-be75-b63607b5c754 --- diff --git a/forum/skins/default/media/style/style.css b/forum/skins/default/media/style/style.css index 88815c4..15155f4 100644 --- a/forum/skins/default/media/style/style.css +++ b/forum/skins/default/media/style/style.css @@ -919,7 +919,7 @@ span.form-error { } .revision .summary span { - /**background-color: yellow;/**/ + /**background-color: yellow;**/ display: inline; padding-left: 3px; padding-right: 3px; @@ -1817,4 +1817,4 @@ div.wmd-button { } 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 index 0000000..dd37fa3 --- /dev/null +++ b/forum/skins/default/templates/auth/mail_already_validated.html @@ -0,0 +1,17 @@ +{% extends "base_content.html" %} + +{% load i18n %} +{% block head %}{% endblock %} +{% block title %}{% spaceless %}{% trans "This e-mail has already been validated" %}{% endspaceless %}{% endblock %} +{% block content %} + +
+ +

{% blocktrans %}Already validated{% endblocktrans %}

+ +

{% blocktrans %}This e-mail has already been validated{% endblocktrans %}

+ +
+ +{% endblock %} + diff --git a/forum/views/auth.py b/forum/views/auth.py index abbbc31..6134d12 100644 --- a/forum/views/auth.py +++ b/forum/views/auth.py @@ -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: - 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) @@ -405,4 +405,4 @@ def forward_suspended_user(request, user, show_private_msg=True): @decorate.withfn(login_required) def signout(request): logout(request) - return HttpResponseRedirect(reverse('index')) \ No newline at end of file + return HttpResponseRedirect(reverse('index'))