|
@ -69,6 +69,8 @@ class Obrazek(models.Model): |
|
|
ordering = ['nazev'] |
|
|
ordering = ['nazev'] |
|
|
|
|
|
|
|
|
def obrazek_maly_tag(self): |
|
|
def obrazek_maly_tag(self): |
|
|
|
|
|
if not self.obrazek_maly: |
|
|
|
|
|
return '' |
|
|
return u'<img src="{}">'.format(self.obrazek_maly.url) |
|
|
return u'<img src="{}">'.format(self.obrazek_maly.url) |
|
|
obrazek_maly_tag.short_description = "Náhled" |
|
|
obrazek_maly_tag.short_description = "Náhled" |
|
|
obrazek_maly_tag.allow_tags = True |
|
|
obrazek_maly_tag.allow_tags = True |
|
|