fnp
/
redakcja.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
locale
[redakcja.git]
/
apps
/
catalogue
/
models
/
book.py
diff --git
a/apps/catalogue/models/book.py
b/apps/catalogue/models/book.py
index
46d11e8
..
90327b2
100755
(executable)
--- a/
apps/catalogue/models/book.py
+++ b/
apps/catalogue/models/book.py
@@
-9,10
+9,8
@@
from django.template.loader import render_to_string
from django.utils.translation import ugettext_lazy as _
from slughifi import slughifi
from django.utils.translation import ugettext_lazy as _
from slughifi import slughifi
-import apiclient
from catalogue.helpers import cached_in_field
from catalogue.models import BookPublishRecord, ChunkPublishRecord
from catalogue.helpers import cached_in_field
from catalogue.models import BookPublishRecord, ChunkPublishRecord
-from catalogue.signals import post_publish
from catalogue.tasks import refresh_instance, book_content_updated
from catalogue.xml_tools import compile_text, split_xml
from catalogue.tasks import refresh_instance, book_content_updated
from catalogue.xml_tools import compile_text, split_xml
@@
-350,6
+348,9
@@
class Book(models.Model):
"""
Publishes a book on behalf of a (local) user.
"""
"""
Publishes a book on behalf of a (local) user.
"""
+ import apiclient
+ from catalogue.signals import post_publish
+
self.assert_publishable()
changes = self.get_current_changes(publishable=True)
book_xml = self.materialize(changes=changes)
self.assert_publishable()
changes = self.get_current_changes(publishable=True)
book_xml = self.materialize(changes=changes)