diff options
author | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2010-03-27 16:06:23 -0400 |
---|---|---|
committer | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2010-03-27 16:07:39 -0400 |
commit | acd9aeca8e697b6d1f8f7ac29d7e3afac07b2e8a (patch) | |
tree | dbb232a017f71934cfb05b264db0cca40ac00164 /forum_modules/localauth/views.py | |
parent | 40ea3f482ffdfd648366ed20a87335dc31e92231 (diff) | |
download | askbot-acd9aeca8e697b6d1f8f7ac29d7e3afac07b2e8a.tar.gz askbot-acd9aeca8e697b6d1f8f7ac29d7e3afac07b2e8a.tar.bz2 askbot-acd9aeca8e697b6d1f8f7ac29d7e3afac07b2e8a.zip |
removed authentication module to be replaced with a dedicated app, also switched to table layout for openid signin template temporarily so that it works on IE7 and maybe earlier
Diffstat (limited to 'forum_modules/localauth/views.py')
-rwxr-xr-x | forum_modules/localauth/views.py | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/forum_modules/localauth/views.py b/forum_modules/localauth/views.py deleted file mode 100755 index db71e902..00000000 --- a/forum_modules/localauth/views.py +++ /dev/null @@ -1,31 +0,0 @@ -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, send_validation_email - -def register(request): - if request.method == 'POST': - form = ClassicRegisterForm(request.POST) - email_feeds_form = SimpleEmailSubscribeForm(request.POST) - - if form.is_valid() and email_feeds_form.is_valid(): - username = form.cleaned_data['username'] - password = form.cleaned_data['password1'] - email = form.cleaned_data['email'] - - user_ = User.objects.create_user( username,email,password ) - send_validation_email(user_) - email_feeds_form.save(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() - - return render_to_response('auth/signup.html', { - 'form': form, - 'email_feeds_form': email_feeds_form - }, context_instance=RequestContext(request))
\ No newline at end of file |