Index: sitescripts/submit_email/web/submit_email.py |
=================================================================== |
--- a/sitescripts/submit_email/web/submit_email.py |
+++ b/sitescripts/submit_email/web/submit_email.py |
@@ -49,8 +49,14 @@ |
if lang: |
params.append(('lang', lang)) |
+ if data.get('edge', '') == '': |
Sebastian Noack
2015/08/12 08:53:03
I'd rather not hard-code "edge" here. How about ca
|
+ email_template = 'verification_email_template' |
+ else: |
+ email_template = 'edge_verification_email_template' |
+ params.append(('edge', 'true')) |
+ |
sendMail( |
- config.get('submit_email', 'verification_email_template'), |
+ config.get('submit_email', email_template), |
{ |
'recipient': email, |
'verification_url': '%s?%s' % ( |
@@ -79,7 +85,11 @@ |
'Invalid signature in verification request.' |
) |
- filename = config.get('submit_email', 'filename') |
+ if params.get('edge', '') == 'true': |
+ filename = config.get('submit_email', 'edge_filename') |
+ else: |
+ filename = config.get('submit_email', 'filename') |
+ |
with open(filename, 'ab', 0) as file: |
fcntl.lockf(file, fcntl.LOCK_EX) |
try: |