Ticket #7144: filefield_get_field_filename.patch

File filefield_get_field_filename.patch, 643 bytes (added by cpinto, 17 years ago)
  • home/cpinto/programs/python/django/db/models/base.py

     
    433433
    434434    def _get_FIELD_filename(self, field):
    435435        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'])
    437437        return ''
    438438
    439439    def _get_FIELD_url(self, field):
Back to Top