fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Style fix
[wolnelektury.git]
/
src
/
picture
/
models.py
diff --git
a/src/picture/models.py
b/src/picture/models.py
index
875ebcc
..
7ccd97c
100644
(file)
--- a/
src/picture/models.py
+++ b/
src/picture/models.py
@@
-101,6
+101,8
@@
class Picture(models.Model):
short_html_url_name = 'picture_short'
short_html_url_name = 'picture_short'
+ is_picture = True
+
class AlreadyExists(Exception):
pass
class AlreadyExists(Exception):
pass
@@
-110,6
+112,9
@@
class Picture(models.Model):
verbose_name = _('picture')
verbose_name_plural = _('pictures')
verbose_name = _('picture')
verbose_name_plural = _('pictures')
+ def get_extra_info_json(self):
+ return json.loads(self.extra_info or '{}')
+
def save(self, force_insert=False, force_update=False, **kwargs):
from sortify import sortify
def save(self, force_insert=False, force_update=False, **kwargs):
from sortify import sortify