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)
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)
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)
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)