add NoteManager and NoteQuerySet, and basic tests

This commit is contained in:
Arthur Gerbaud
2016-08-07 11:50:01 +02:00
parent 2a8082e5b1
commit 9646c9f8ab
3 changed files with 129 additions and 6 deletions

View File

@@ -40,7 +40,9 @@ class Note(models.Model):
return super().save(*args, **kwargs)
def __str__(self):
return "%s of %s" % (self.child_class.__qualname__, self.created_by)
return "%s [%s %s]" % ( self.child_class.__qualname__,
self.created_date,
self.created_time)
def note_date(self):
""" Default 'created_date' value. Child may override this method. """