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)