From 34096bf8c391581e38981645cf98e823aa459328 Mon Sep 17 00:00:00 2001 From: Date: Tue, 12 Dec 2017 13:19:48 +0300 Subject: [PATCH] heroku --- imagehosting/models.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/imagehosting/models.py b/imagehosting/models.py index 7573700..d77a855 100644 --- a/imagehosting/models.py +++ b/imagehosting/models.py @@ -10,8 +10,8 @@ class Post(models.Model): name = models.CharField(max_length=30, blank=True) file = models.FileField(upload_to='images') thumb_name = property(thumb_name) - orig_name = property(orig_name) - + orig_name = property(orig_name) + def publish(self): self.published_date = timezone.now() self.save() @@ -22,7 +22,7 @@ class Post(models.Model): def thumb_name(self): x = os.path.split(self.file.name)[-1] return '/thumb_' + x - + def orig_name(self): x = os.path.split(self.file.name)[-1] return x \ No newline at end of file