app/soc/logic/helper/notifications.py
changeset 1890 a8a5da24212c
parent 1887 8b71f4e58f39
child 1893 bcb73072aa66
equal deleted inserted replaced
1889:4356a9201d20 1890:a8a5da24212c
   148   message_properties = dicts.merge(message_properties, new_message_properties)
   148   message_properties = dicts.merge(message_properties, new_message_properties)
   149 
   149 
   150   message = loader.render_to_string(template, dictionary=message_properties)
   150   message = loader.render_to_string(template, dictionary=message_properties)
   151 
   151 
   152   fields = {
   152   fields = {
   153       'from_user' : from_user,
   153       'from_user': from_user,
   154       'subject': subject,
   154       'subject': subject,
   155       'message' : message,
   155       'message': message,
   156       'scope' : to_user,
   156       'scope': to_user,
   157       'link_id' :'t%i' % (time.time()),
   157       'link_id': 't%i' %(int(time.time()*100)),
   158       'scope_path' : to_user.link_id
   158       'scope_path': to_user.link_id
   159   }
   159   }
   160 
   160 
   161   key_name = model_logic.notification.logic.getKeyNameFromFields(fields)
   161   key_name = model_logic.notification.logic.getKeyNameFromFields(fields)
   162 
   162 
   163   # create and put a new notification in the datastore
   163   # create and put a new notification in the datastore