Hi All, I have a model something like this:
doctype_choices = ( ('PDF','Adobe PDF'), ('WORD','Microsoft Word' ), ('EXCEL','Microsoft EXCEL'), ) sector_choices = ( ('All','All'), ('Social Recovery','Social Recovery'), ('Physical Infrastructure','Physical Infrastructure'), ('Economic Recovery','Economic Recovery'), ('Finance and Administration','Finance and Administration'), ('Projects','Projects'), ) class Document(meta.Model): title = meta.CharField(maxlength=200) description = meta.CharField(maxlength=300) sector = meta.CharField(maxlength=200,choices=sector_choices) document= meta.FileField(upload_to = "docs") document_date = meta.DateField() doctype = meta.CharField(maxlength=5,choices=doctype_choices) docsize = meta.CharField(maxlength=10) All I want to do is the get the size of a document ( stat/getsize() whatever ) and save it as docsize in my database when the document is saved in Admin. Not sure how the pre_save() works, but I imagine that a post_save() may do it?( not many practical examples of these in the tutorials though) I must be missing something, but I am not seeing how this can be done and I cannot recall seeing many examples of assigning a value to an attribute of an object in the tutorials either. Grateful for any input. Django is great!!! Y-Coci --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~----------~----~----~----~------~----~------~--~---