diff options
Diffstat (limited to 'app/photos/models.py')
-rw-r--r-- | app/photos/models.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/photos/models.py b/app/photos/models.py index eece991..e04b80b 100644 --- a/app/photos/models.py +++ b/app/photos/models.py @@ -48,6 +48,7 @@ class LuxImageSize(models.Model): size = self.height return "%s - %s" %(self.name, str(size)) + class LuxImage(models.Model): image = models.FileField(blank=True, null=True, upload_to=get_upload_path) title = models.CharField(null=True, blank=True, max_length=300) @@ -91,8 +92,7 @@ class LuxImage(models.Model): def get_admin_image(self): for size in self.sizes.all(): - if size.width and size.width <= 820 or size.height and size.height<=800: - print("Size name" +size.name) + if size.width and size.width <= 820 or size.height and size.height <= 800: return self.get_image_by_size(size.name) def get_largest_image(self): |