project/scipycon/registration/utils.py
changeset 174 ccd1a896dfea
parent 146 e23e937ddcda
child 186 8bd09b59f359
equal deleted inserted replaced
172:1e3f7e6a14ba 174:ccd1a896dfea
     6     message = EmailMessage()
     6     message = EmailMessage()
     7     message.subject = u'Registration to %s' % (event.get_full_name())
     7     message.subject = u'Registration to %s' % (event.get_full_name())
     8     message.from_email = u'admin@scipy.in'
     8     message.from_email = u'admin@scipy.in'
     9     message.to = [registrant.email]
     9     message.to = [registrant.email]
    10 
    10 
    11     username = registrant.username
    11     details = {'name': registrant.get_full_name(),
    12     all = {'name': registrant.get_full_name(),
    12                'username': registrant.username,
    13            'username': username,
    13                'password': registrant.password,
    14            'event_name': event.get_full_name(),
    14                'event_name': event.get_full_name(),
    15            'event_scope': event.scope,
    15                'event_scope': event.scope,
    16            }
    16             }
       
    17 
       
    18     confirmation_newuser = """Dear %(name)s,
       
    19 
       
    20 Thank you, for registering for %(event_name)s!
       
    21 
       
    22 You may log in to the %(event_name)s website at
       
    23 http://scipy.in/%(event_scope)s/login using the username -
       
    24 %(username)s and the password - %(password)s.
       
    25 
       
    26 Looking forward to meet you at %(event_name)s.
       
    27 
       
    28 Regards,
       
    29 SciPy.in Team
       
    30 
       
    31 If you lose your password, visit: http://scipy.in/password-reset
       
    32 """
       
    33 
       
    34     message.body = confirmation_newuser %(details)
    17 
    35 
    18     message.send()
    36     message.send()
    19 
    37 
    20 confirmation_newuser = """Dear %(name)s,
       
    21 
    38 
    22 Welcome to %(event_name)s. You have registered for %(event_name)s with the
       
    23 username %(username)s. You may log in to the %(event_name)s website at
       
    24 http://scipy.in/%(event_scope)s/login using the given username
       
    25 
       
    26 Thank you for your registration! Looking forward to meet you at %(event_name)s.
       
    27 
       
    28 Regards,
       
    29 The SciPy.in Team
       
    30 
       
    31 If you lose your password to the website please visit:
       
    32 http://scipy.in/password-reset
       
    33 """