Ticket #7144: filefield_get_field_filename.patch
File filefield_get_field_filename.patch, 643 bytes (added by , 17 years ago) |
---|
-
home/cpinto/programs/python/django/db/models/base.py
433 433 434 434 def _get_FIELD_filename(self, field): 435 435 if getattr(self, field.attname): # value is not blank 436 return os.path.join(settings.MEDIA_ROOT, getattr(self, field.attname) )436 return os.path.join(settings.MEDIA_ROOT, getattr(self, field.attname)['filename']) 437 437 return '' 438 438 439 439 def _get_FIELD_url(self, field):