git://git.onelab.eu
/
myslice.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5fe36e5
)
Registration: email format imporved
author
Yasin
<mohammed-yasin.rahman@lip6.fr>
Thu, 26 Sep 2013 13:42:09 +0000
(15:42 +0200)
committer
Yasin
<mohammed-yasin.rahman@lip6.fr>
Thu, 26 Sep 2013 13:42:09 +0000
(15:42 +0200)
portal/registrationview.py
patch
|
blob
|
history
diff --git
a/portal/registrationview.py
b/portal/registrationview.py
index
9ae19b4
..
7f7bab7
100644
(file)
--- a/
portal/registrationview.py
+++ b/
portal/registrationview.py
@@
-86,6
+86,8
@@
class RegistrationView (View):
keypair = re.sub("\r", "", keypair)
keypair = re.sub("\n", "\\n",keypair)
keypair = ''.join(keypair.split())
keypair = re.sub("\r", "", keypair)
keypair = re.sub("\n", "\\n",keypair)
keypair = ''.join(keypair.split())
+ # for sending email
+ public_key = file_content
else:
errors.append('Please upload a valid RSA public key [.txt or .pub].')
else:
errors.append('Please upload a valid RSA public key [.txt or .pub].')
@@
-106,18
+108,18
@@
class RegistrationView (View):
# Send email
ctx = {
# 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']
+ '
First Name'
: reg_fname,
+ '
Last Name'
: reg_lname,
+ '
Authority'
: reg_auth,
+ '
Email'
: reg_email,
+ '
Public Key' : public_key
,
+ 'cc_myself'
: True # form.cleaned_data['cc_myself']
}
#not working
#recipients = authority_get_pi_emails(request,reg_auth)
recipients = ['devel@myslice.info']
if ctx['cc_myself']:
}
#not working
#recipients = authority_get_pi_emails(request,reg_auth)
recipients = ['devel@myslice.info']
if ctx['cc_myself']:
- recipients.append(ctx['
e
mail'])
+ recipients.append(ctx['
E
mail'])
msg = render_to_string('user_request_email.txt', ctx)
send_mail("Onelab New User request for %s submitted"%reg_email, msg, reg_email, recipients)
msg = render_to_string('user_request_email.txt', ctx)
send_mail("Onelab New User request for %s submitted"%reg_email, msg, reg_email, recipients)