- prefix = remove_query_syntax_chars(prefix)
-
- search = Search()
- # tagi beda ograniczac tutaj
- # ale tagi moga byc na ksiazce i na fragmentach
- # jezeli tagi dot tylko ksiazki, to wazne zeby te nowe byly w tej samej ksiazce
- # jesli zas dotycza themes, to wazne, zeby byly w tym samym fragmencie.
-
- def is_dupe(tag):
- if isinstance(tag, PDCounterAuthor):
- if filter(lambda t: t.slug == tag.slug and t != tag, tags):
- return True
- elif isinstance(tag, PDCounterBook):
- if filter(lambda b: b.slug == tag.slug, tags):
- return True
- return False
-
- def category_name(c):
- if c.startswith('pd_'):
- c = c[len('pd_'):]
- return _(c)