fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
some css tweaks regarding colors
[wolnelektury.git]
/
apps
/
catalogue
/
tasks.py
diff --git
a/apps/catalogue/tasks.py
b/apps/catalogue/tasks.py
index
5566fe1
..
86e84a5
100755
(executable)
--- a/
apps/catalogue/tasks.py
+++ b/
apps/catalogue/tasks.py
@@
-4,7
+4,7
@@
#
from datetime import datetime
from celery.task import task
#
from datetime import datetime
from celery.task import task
-
+import catalogue.models
@task
def touch_tag(tag):
@task
def touch_tag(tag):
@@
-14,3
+14,8
@@
def touch_tag(tag):
}
type(tag).objects.filter(pk=tag.pk).update(**update_dict)
}
type(tag).objects.filter(pk=tag.pk).update(**update_dict)
+
+
+@task
+def index_book(book_id, book_info=None):
+ return catalogue.models.Book.objects.get(id=book_id).search_index(book_info)