FIX: Registration = Indentation & Garbage values [don't know how it camegit add porta...
authorYasin <mohammed-yasin.rahman@lip6.fr>
Thu, 26 Sep 2013 13:13:05 +0000 (15:13 +0200)
committerYasin <mohammed-yasin.rahman@lip6.fr>
Thu, 26 Sep 2013 13:13:05 +0000 (15:13 +0200)
portal/registrationview.py
portal/templates/registration_view.html

index c731746..90c1c41 100644 (file)
@@ -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),
index 039a07a..88de572 100644 (file)
@@ -97,7 +97,6 @@
     </div>
   </fieldset>
   </form>  
->>>>>>> abb43f86edd5a2888cb96ca92a58350db9e32fcf
 </div>
 
 {% endblock %}