The solution to the problem was to extend the Python's save method... here's
a snippet of the following:
def save(self, force_insert=False, force_update=False):
"""Update the size field and save the record"""
if self.filepath:
self.filesize=os.path.getsize(self.fil
On Sun, May 3, 2009 at 9:15 AM, Sanket Agarwal wrote:
>
>
> class Files(models.Model):
>
>"""Uploads area, all files to be ready for user use are put here"""
>
>
>filepath = models.FilePathField(_('Choose File'),path="/home/sanket/
> Music")
>filedescription = models.Cha
Hey, I am trying to do something very simple
I have a downloads app in my django project. It has some fields like
file name, file path, file type and file size. What I wish is to take
the file path and get the file size via maybe getsize function in os,
but how can I write equivalent code for
3 matches
Mail list logo