summaryrefslogtreecommitdiff
path: root/app/books/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'app/books/models.py')
-rw-r--r--app/books/models.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/books/models.py b/app/books/models.py
index 2ebc769..0e17621 100644
--- a/app/books/models.py
+++ b/app/books/models.py
@@ -74,11 +74,11 @@ class Book(Orderable):
@receiver(post_save, sender=Book)
def post_save_events(sender, update_fields, created, instance, **kwargs):
if instance.image:
- base_path = "%s/%s/" % (settings.IMAGES_ROOT, "/".join(str(i) for i in instance.image.name.split('/')[1:-1]))
+ base_path = "%s/%s/" % (settings.IMAGES_ROOT, "/".join(str(i) for i in instance.image.name.split('/')[3:-1]))
filename, file_extension = os.path.splitext(instance.image.path)
img = Image.open(instance.image.path)
resize_image(img, None, 160, 78, base_path, "%s_tn%s" % (filename.split('/')[-1], file_extension))
- resize_image(img, None, 650, 78, base_path, "%s_small%s" % (filename.split('/')[-1], file_extension))
+ resize_image(img, None, 600, 78, base_path, "%s_small%s" % (filename.split('/')[-1], file_extension))
class BookSitemap(Sitemap):