diff options
author | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2010-03-14 18:27:57 -0400 |
---|---|---|
committer | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2010-03-14 18:27:57 -0400 |
commit | 10c98242325230d2314c2f1292e75650acd8d50e (patch) | |
tree | b977974539f794324a4bb36655ae6e35ecc769a3 /forum_modules/localauth/views.py | |
parent | 7d4e81c2e6553ee9aa087d95fdc6c87f75b021df (diff) | |
parent | c2255c60fa5bca3f49fa30aa81a20fcdaa603dc3 (diff) | |
download | askbot-10c98242325230d2314c2f1292e75650acd8d50e.tar.gz askbot-10c98242325230d2314c2f1292e75650acd8d50e.tar.bz2 askbot-10c98242325230d2314c2f1292e75650acd8d50e.zip |
merged with master branch
Diffstat (limited to 'forum_modules/localauth/views.py')
-rwxr-xr-x | forum_modules/localauth/views.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/forum_modules/localauth/views.py b/forum_modules/localauth/views.py index 1d1e0b3d..db71e902 100755 --- a/forum_modules/localauth/views.py +++ b/forum_modules/localauth/views.py @@ -1,10 +1,11 @@ from django.contrib.auth.models import User from django.shortcuts import render_to_response from django.template import RequestContext +from django.utils.translation import ugettext as _ from forms import ClassicRegisterForm from forum.authentication.forms import SimpleEmailSubscribeForm -from forum.views.auth import login_and_forward +from forum.views.auth import login_and_forward, send_validation_email def register(request): if request.method == 'POST': @@ -17,9 +18,9 @@ def register(request): email = form.cleaned_data['email'] user_ = User.objects.create_user( username,email,password ) + send_validation_email(user_) email_feeds_form.save(user_) - #todo: email validation - return login_and_forward(request, user_) + return login_and_forward(request, user_, None, _("A validation email has been sent to your email address. ")) else: form = ClassicRegisterForm(initial={'next':'/'}) email_feeds_form = SimpleEmailSubscribeForm() |