Ticket #1901: image_width_height.diff

File image_width_height.diff, 992 bytes (added by tom@…, 19 years ago)
  • django/db/models/base.py

     
    341341    _save_FIELD_file.alters_data = True
    342342
    343343    def _get_FIELD_width(self, field):
    344         return self.__get_image_dimensions(field)[0]
     344        return self._get_image_dimensions(field)[0]
    345345
    346346    def _get_FIELD_height(self, field):
    347         return self.__get_image_dimensions(field)[1]
     347        return self._get_image_dimensions(field)[1]
    348348
    349349    def _get_image_dimensions(self, field):
    350350        cachename = "__%s_dimensions_cache" % field.name
    351351        if not hasattr(self, cachename):
    352352            from django.utils.images import get_image_dimensions
    353             filename = self.__get_FIELD_filename(field)()
     353            filename = self._get_FIELD_filename(field)
    354354            setattr(self, cachename, get_image_dimensions(filename))
    355355        return getattr(self, cachename)
    356356
Back to Top