From 1b8bc46052032ebb0d64eab286d73609b1225742 Mon Sep 17 00:00:00 2001 From: Yasin Date: Thu, 26 Sep 2013 15:13:05 +0200 Subject: [PATCH] FIX: Registration = Indentation & Garbage values [don't know how it camegit add portal/templates/registration_view.html] --- portal/registrationview.py | 58 ++++++++++++------------- portal/templates/registration_view.html | 1 - 2 files changed, 29 insertions(+), 30 deletions(-) diff --git a/portal/registrationview.py b/portal/registrationview.py index c7317468..90c1c41e 100644 --- a/portal/registrationview.py +++ b/portal/registrationview.py @@ -93,35 +93,35 @@ class RegistrationView (View): # email=reg_email, password=request.POST['password'], keypair=keypair) #b.save() if not errors: - b = PendingUser( - first_name=reg_fname, - last_name=reg_lname, - #affiliation=reg_aff, - authority_hrn=reg_auth, - email=reg_email, - password=request.POST['password'], - keypair=keypair - ) - b.save() - - # Send email - ctx = { - 'first_name' : reg_fname, - 'last_name' : reg_lname, - 'authority_hrn': reg_auth, - 'email' : reg_email, - 'keypair' : keypair, - 'cc_myself' : True # form.cleaned_data['cc_myself'] - } - - recipients = authority_get_pi_emails(request,reg_auth) - if ctx['cc_myself']: - recipients.append(ctx['email']) - - msg = render_to_string('user_request_email.txt', ctx) - send_mail("Onelab New User request for %s submitted"%reg_email, msg, reg_email, recipients) - - return render(request, 'user_register_complete.html') + b = PendingUser( + first_name=reg_fname, + last_name=reg_lname, + #affiliation=reg_aff, + authority_hrn=reg_auth, + email=reg_email, + password=request.POST['password'], + keypair=keypair + ) + b.save() + + # Send email + ctx = { + 'first_name' : reg_fname, + 'last_name' : reg_lname, + 'authority_hrn': reg_auth, + 'email' : reg_email, + 'keypair' : keypair, + 'cc_myself' : True # form.cleaned_data['cc_myself'] + } + + recipients = authority_get_pi_emails(request,reg_auth) + if ctx['cc_myself']: + recipients.append(ctx['email']) + + msg = render_to_string('user_request_email.txt', ctx) + send_mail("Onelab New User request for %s submitted"%reg_email, msg, reg_email, recipients) + + return render(request, 'user_register_complete.html') template_env = { 'topmenu_items': topmenu_items('Register', request), diff --git a/portal/templates/registration_view.html b/portal/templates/registration_view.html index 039a07aa..88de5729 100644 --- a/portal/templates/registration_view.html +++ b/portal/templates/registration_view.html @@ -97,7 +97,6 @@ ->>>>>>> abb43f86edd5a2888cb96ca92a58350db9e32fcf {% endblock %} -- 2.43.0