more .path

This commit is contained in:
j 2010-12-04 02:26:49 +01:00
commit 6d3f1b9c40
2 changed files with 15 additions and 14 deletions

View file

@ -138,8 +138,8 @@ class File(models.Model):
return r
#upload and data handling
video = models.FileField(null=True, blank=True, upload_to=lambda f, x: f.path(name='%s.webm'%settings.VIDEO_PROFILE))
data = models.FileField(null=True, blank=True, upload_to=lambda f, x: f.path(name='data.bin'))
video = models.FileField(null=True, blank=True, upload_to=lambda f, x: f.path('%s.webm'%settings.VIDEO_PROFILE))
data = models.FileField(null=True, blank=True, upload_to=lambda f, x: f.path('data.bin'))
def path(self, name):
h = self.oshash