fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Some refactoring & documentation changes in search.
[wolnelektury.git]
/
apps
/
catalogue
/
models.py
diff --git
a/apps/catalogue/models.py
b/apps/catalogue/models.py
index
78e6b0b
..
0c35130
100644
(file)
--- a/
apps/catalogue/models.py
+++ b/
apps/catalogue/models.py
@@
-33,6
+33,7
@@
from os import path
import search
import search
+# Those are hard-coded here so that makemessages sees them.
TAG_CATEGORIES = (
('author', _('author')),
('epoch', _('epoch')),
TAG_CATEGORIES = (
('author', _('author')),
('epoch', _('epoch')),
@@
-688,7
+689,7
@@
class Book(models.Model):
return result.wait()
def search_index(self, book_info=None):
return result.wait()
def search_index(self, book_info=None):
- if settings.CELERY_ALWAYS_EAGER:
+ if
hasattr(settings, 'CELERY_ALWAYS_EAGER') and
settings.CELERY_ALWAYS_EAGER:
idx = search.ReusableIndex()
else:
idx = search.Index()
idx = search.ReusableIndex()
else:
idx = search.Index()