heroku
This commit is contained in:
parent
34096bf8c3
commit
e1bc242477
|
@ -9,8 +9,8 @@ import os
|
|||
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)
|
||||
|
||||
|
||||
|
||||
def publish(self):
|
||||
self.published_date = timezone.now()
|
||||
|
@ -23,6 +23,10 @@ class Post(models.Model):
|
|||
x = os.path.split(self.file.name)[-1]
|
||||
return '/thumb_' + x
|
||||
|
||||
thumb_name = property(thumb_name)
|
||||
|
||||
def orig_name(self):
|
||||
x = os.path.split(self.file.name)[-1]
|
||||
return x
|
||||
return x
|
||||
|
||||
orig_name = property(orig_name)
|
||||
|
|
Loading…
Reference in New Issue
Block a user