fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix
[wolnelektury.git]
/
src
/
catalogue
/
models
/
collection.py
diff --git
a/src/catalogue/models/collection.py
b/src/catalogue/models/collection.py
index
e952043
..
3c4b475
100644
(file)
--- a/
src/catalogue/models/collection.py
+++ b/
src/catalogue/models/collection.py
@@
-24,7
+24,7
@@
class Collection(models.Model):
verbose_name_plural = _('collections')
app_label = 'catalogue'
verbose_name_plural = _('collections')
app_label = 'catalogue'
- def __
unicode
__(self):
+ def __
str
__(self):
return self.title
def get_initial(self):
return self.title
def get_initial(self):
@@
-40,7
+40,6
@@
class Collection(models.Model):
def get_query(self):
slugs = self.book_slugs.split()
# allow URIs
def get_query(self):
slugs = self.book_slugs.split()
# allow URIs
- # WTF
slugs = [slug.rstrip('/').rsplit('/', 1)[-1] if '/' in slug else slug for slug in slugs]
return models.Q(slug__in=slugs)
slugs = [slug.rstrip('/').rsplit('/', 1)[-1] if '/' in slug else slug for slug in slugs]
return models.Q(slug__in=slugs)