]> gitweb.fperrin.net Git - djsite.git/blobdiff - quotes/models.py
...and comment out the jquery_ui bit
[djsite.git] / quotes / models.py
index 0d7fe333001e4ee77f58216f1ed102cc9c903343..5daaea842062368aa7ffa3079399035e3fcebc3d 100644 (file)
@@ -52,6 +52,9 @@ class Author(CommonData):
                                   help_text="Date of death (leave blank \
                                   if still alive!)")
 
+    class Meta(CommonData.Meta):
+        ordering = ['name']
+
     def __unicode__(self):
         return self.name
 
@@ -89,11 +92,14 @@ class Work(CommonData):
                                   help_text='Not implemented yet')
 
     def __unicode__(self):
-        return "%s: %s (%s)" % (self.author.name, self.name, self.date)
+        return "%s (%s)" % (self.name, self.author.name)
 
     def get_absolute_url(self):
         return reverse('quotes:work', args=[str(self.id)])
 
+    class Meta(CommonData.Meta):
+        ordering = ['name']
+
 class Quote(CommonData):
     text = HTMLField()
     tags = models.ManyToManyField(QuoteTag, blank=True)
@@ -104,3 +110,6 @@ class Quote(CommonData):
 
     def get_absolute_url(self):
         return reverse('quotes:onequote', args=[str(self.id)])
+
+    class Meta(CommonData.Meta):
+        ordering = ['-pk']