Fixed #1901 -- removed typos from calls to _get_image_dimensions and

_get_FIELD_filename. Thanks to tom@jerakeen.org for the patch.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@2947 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Malcolm Tredinnick 2006-05-19 09:41:40 +00:00
parent 816b65f260
commit e57e06d40b
1 changed files with 3 additions and 3 deletions

View File

@ -341,16 +341,16 @@ class Model(object):
_save_FIELD_file.alters_data = True
def _get_FIELD_width(self, field):
return self.__get_image_dimensions(field)[0]
return self._get_image_dimensions(field)[0]
def _get_FIELD_height(self, field):
return self.__get_image_dimensions(field)[1]
return self._get_image_dimensions(field)[1]
def _get_image_dimensions(self, field):
cachename = "__%s_dimensions_cache" % field.name
if not hasattr(self, cachename):
from django.utils.images import get_image_dimensions
filename = self.__get_FIELD_filename(field)()
filename = self._get_FIELD_filename(field)()
setattr(self, cachename, get_image_dimensions(filename))
return getattr(self, cachename)