equal
deleted
inserted
replaced
65 |
65 |
66 |
66 |
67 from django.template import loader |
67 from django.template import loader |
68 |
68 |
69 from google.appengine.api import mail |
69 from google.appengine.api import mail |
70 from google.appengine.api import users |
|
71 |
70 |
72 from soc.logic import dicts |
71 from soc.logic import dicts |
73 |
72 |
74 |
73 |
75 def sendMailFromTemplate(template, context): |
74 def sendMailFromTemplate(template, context): |
145 |
144 |
146 if site_entity.noreply_email: |
145 if site_entity.noreply_email: |
147 return (site_entity.site_name, site_entity.noreply_email) |
146 return (site_entity.site_name, site_entity.noreply_email) |
148 |
147 |
149 # use the email address of the current logged in user |
148 # use the email address of the current logged in user |
150 account = users.get_current_user() |
149 account = accounts.getCurrentAccount(normalize=False) |
151 |
150 |
152 # we need to retrieve account seperately, as user_logic normalizes it |
151 # we need to retrieve account seperately, as user_logic normalizes it |
153 # and the GAE admin API is case sensitive |
152 # and the GAE admin API is case sensitive |
154 user_entity = user_logic.logic.getForAccount(account) |
153 user_entity = user_logic.logic.getForAccount(account) |
155 |
154 |