Ejemplo n.º 1
0
 def __str__(self):
     date = self.date.strftime("%Y-%m-%d %H:%M")
     if self.comments:
         return "Purchase %s by %s at %s: %s" % (date, self.user,
                                                 truncate(self.place),
                                                 truncate(self.comments))
     else:
         return "Purchase %s by %s at %s" % (date, self.user,
                                             truncate(self.place))
Ejemplo n.º 2
0
 def __str__(self):
     date = self.date.strftime("%Y-%m-%d %H:%M")
     if self.comments:
         return "Update %s by %s: %s" % (date, self.user,
                                         truncate(self.comments))
     else:
         return "Update %s by %s" % (date, self.user)