fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
convert some more ssi to template fragment cache
[wolnelektury.git]
/
src
/
picture
/
models.py
diff --git
a/src/picture/models.py
b/src/picture/models.py
index
b39661f
..
e10d2fa
100644
(file)
--- a/
src/picture/models.py
+++ b/
src/picture/models.py
@@
-101,7
+101,7
@@
class Picture(models.Model):
pass
class Meta:
pass
class Meta:
- ordering = ('sort_key
',
)
+ ordering = ('sort_key
_author', 'sort_key'
)
verbose_name = _('picture')
verbose_name_plural = _('pictures')
verbose_name = _('picture')
verbose_name_plural = _('pictures')
@@
-127,8
+127,11
@@
class Picture(models.Model):
def authors(self):
return self.tags.filter(category='author')
def authors(self):
return self.tags.filter(category='author')
+ def tag_unicode(self, category):
+ return ", ".join(self.tags.filter(category=category).values_list('name', flat=True))
+
def author_unicode(self):
def author_unicode(self):
- return
", ".join(self.authors().values_list('name', flat=True)
)
+ return
self.tag_unicode('author'
)
@permalink
def get_absolute_url(self):
@permalink
def get_absolute_url(self):