from django.views.generic import View
from django.template.loader import render_to_string
from django.shortcuts import render
from django.views.generic import View
from django.template.loader import render_to_string
from django.shortcuts import render
# xxx tocheck - if authorities is empty, it's no use anyway
# (users won't be able to validate the form anyway)
page = Page(request)
page.add_js_files ( [ "js/jquery.validate.js", "js/my_account.register.js" ] )
page.add_css_files ( [ "css/onelab.css", "css/registration.css" ] )
# xxx tocheck - if authorities is empty, it's no use anyway
# (users won't be able to validate the form anyway)
page = Page(request)
page.add_js_files ( [ "js/jquery.validate.js", "js/my_account.register.js" ] )
page.add_css_files ( [ "css/onelab.css", "css/registration.css" ] )
reg_lname = request.POST.get('lastname', '')
#reg_aff = request.POST.get('affiliation','')
reg_auth = request.POST.get('authority_hrn', '')
reg_lname = request.POST.get('lastname', '')
#reg_aff = request.POST.get('affiliation','')
reg_auth = request.POST.get('authority_hrn', '')
reg_email = request.POST.get('email','').lower()
#prepare user_hrn
split_email = reg_email.split("@")[0]
reg_email = request.POST.get('email','').lower()
#prepare user_hrn
split_email = reg_email.split("@")[0]
#keypair = re.sub("\n", "\\n", keypair)
#keypair = keypair.rstrip('\r\n')
#keypair = ''.join(keypair.split())
#keypair = re.sub("\n", "\\n", keypair)
#keypair = keypair.rstrip('\r\n')
#keypair = ''.join(keypair.split())
#creating user to manifold local:user
config = '{"firstname":"'+ reg_fname + '", "lastname":"'+ reg_lname + '", "authority":"'+ reg_auth + '"}'
user_params = {'email': reg_email, 'password': request.POST['password'], 'config': config}
#creating user to manifold local:user
config = '{"firstname":"'+ reg_fname + '", "lastname":"'+ reg_lname + '", "authority":"'+ reg_auth + '"}'
user_params = {'email': reg_email, 'password': request.POST['password'], 'config': config}
'cc_myself' : True # form.cleaned_data['cc_myself']
}
recipients = authority_get_pi_emails(request,reg_auth)
'cc_myself' : True # form.cleaned_data['cc_myself']
}
recipients = authority_get_pi_emails(request,reg_auth)