Exemple #1
0
 def save(self):
     created = not hasattr(self, "id")
     if created:
         self.timestamp = datetime.now()
     self.put()
     if created:
         notification_created.send(sender=self.__class__, instance=self)
Exemple #2
0
 def save(self):
     created = not hasattr(self, "id")
     if created:
         self.timestamp = datetime.now()
     self.put()
     if created:
         notification_created.send(sender=self.__class__, instance=self)
Exemple #3
0
 def save(self, *args, **kw):
     created = not getattr(self, "id", None)
     super(Notification, self).save(*args, **kw)
     if created:
         notification_created.send(sender=self.__class__, instance=self)
Exemple #4
0
 def save(self, *args, **kw):
     created = not getattr(self, "id", None)
     super(Notification, self).save(*args, **kw)
     if created:
         notification_created.send(sender=self.__class__, instance=self)