equal
deleted
inserted
replaced
189 'scope': to_user, |
189 'scope': to_user, |
190 'link_id': 't%i' % (int(time.time()*100)), |
190 'link_id': 't%i' % (int(time.time()*100)), |
191 'scope_path': to_user.link_id |
191 'scope_path': to_user.link_id |
192 } |
192 } |
193 |
193 |
|
194 # pylint: disable-msg=W0612 |
194 import soc.logic.models.notification |
195 import soc.logic.models.notification |
195 key_name = model_logic.notification.logic.getKeyNameFromFields(fields) |
196 key_name = model_logic.notification.logic.getKeyNameFromFields(fields) |
196 |
197 |
197 # create and put a new notification in the datastore |
198 # create and put a new notification in the datastore |
198 model_logic.notification.logic.updateOrCreateFromKeyName(fields, key_name) |
199 model_logic.notification.logic.updateOrCreateFromKeyName(fields, key_name) |
202 """Sends an email to a user about a new notification. |
203 """Sends an email to a user about a new notification. |
203 |
204 |
204 Args: |
205 Args: |
205 notification_entity: Notification about which the message should be sent |
206 notification_entity: Notification about which the message should be sent |
206 """ |
207 """ |
207 |
208 # pylint: disable-msg=W0612 |
208 import soc.views.models.notification |
209 import soc.views.models.notification |
209 |
210 |
210 # create the url to show this notification |
211 # create the url to show this notification |
211 notification_url = "http://%(host)s%(index)s" % { |
212 notification_url = "http://%(host)s%(index)s" % { |
212 'host' : os.environ['HTTP_HOST'], |
213 'host' : os.environ['HTTP_HOST'], |