- for chunk in self[len(self) - len_other:]:
- old_start = chunk.gallery_start or 1
- chunk.gallery_start = old_start + gm.dest_size - gm.num_deleted
- chunk.save()
+ for chunk in self[len(self) - len_other:]:
+ old_start = chunk.gallery_start or 1
+ chunk.gallery_start = old_start + gm.dest_size - gm.num_deleted
+ chunk.save()
Get full text of the document compiled from chunks.
Takes the current versions of all texts
or versions most recently tagged for publishing,
Get full text of the document compiled from chunks.
Takes the current versions of all texts
or versions most recently tagged for publishing,
gallery_dir = os.path.join(settings.MEDIA_ROOT, settings.IMAGE_DIR, self.slug)
if os.path.isdir(gallery_dir):
data['gallery_url'] = gallery_url
gallery_dir = os.path.join(settings.MEDIA_ROOT, settings.IMAGE_DIR, self.slug)
if os.path.isdir(gallery_dir):
data['gallery_url'] = gallery_url
apiclient.api_call(user, "lessons/", data)
# record the publish
br = BookPublishRecord.objects.create(book=self, user=user)
apiclient.api_call(user, "lessons/", data)
# record the publish
br = BookPublishRecord.objects.create(book=self, user=user)