fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Changed a way we access fields in TaggableModelForm to be compatibile with django...
[wolnelektury.git]
/
catalogue
/
models.py
diff --git
a/catalogue/models.py
b/catalogue/models.py
index
b49747b
..
483741b
100644
(file)
--- a/
catalogue/models.py
+++ b/
catalogue/models.py
@@
-54,6
+54,14
@@
class Tag(TagBase):
def __unicode__(self):
return self.name
def __unicode__(self):
return self.name
+ @staticmethod
+ def get_tag_list(tags):
+ if isinstance(tags, basestring):
+ tag_slugs = tags.split('/')
+ return [Tag.objects.get(slug=slug) for slug in tag_slugs]
+ else:
+ return TagBase.get_tag_list(tags)
+
class Book(models.Model):
title = models.CharField(_('title'), max_length=120)
class Book(models.Model):
title = models.CharField(_('title'), max_length=120)