remove bottom border in main menu
[wolnelektury.git] / src / picture / models.py
index f496726..dc7142c 100644 (file)
@@ -101,7 +101,7 @@ class Picture(models.Model):
         pass
 
     class Meta:
-        ordering = ('sort_key',)
+        ordering = ('sort_key_author', 'sort_key')
 
         verbose_name = _('picture')
         verbose_name_plural = _('pictures')
@@ -127,8 +127,11 @@ class Picture(models.Model):
     def author_str(self):
         return ", ".join(str(t) for t in self.tags.filter(category='author'))
 
+    def tag_unicode(self, category):
+        return ", ".join(unicode(t) for t in self.tags.filter(category=category))
+
     def author_unicode(self):
-        return ", ".join(unicode(t) for t in self.tags.filter(category='author'))
+        return self.tag_unicode('author')
 
     @permalink
     def get_absolute_url(self):