magic-removal: Merged to [1717]
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1718 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
bb874b690a
commit
06332287a8
|
@ -121,9 +121,6 @@ def cmp_cls(x, y):
|
|||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
|
||||
|
||||
class Model(object):
|
||||
__metaclass__ = ModelBase
|
||||
|
||||
|
@ -134,7 +131,6 @@ class Model(object):
|
|||
setattr(cls, name, attribute)
|
||||
add_to_class = classmethod(add_to_class)
|
||||
|
||||
|
||||
def __repr__(self):
|
||||
return '<%s object>' % self.__class__.__name__
|
||||
|
||||
|
|
|
@ -570,9 +570,8 @@ class ImageField(FileField):
|
|||
|
||||
def contribute_to_class(self, cls, name):
|
||||
super(FileField, self).contribute_to_class(cls, name)
|
||||
# Add get_BLAH_width and get_BLAH_height methods, but only
|
||||
# if the image field doesn't have width and height cache
|
||||
# fields.
|
||||
# Add get_BLAH_width and get_BLAH_height methods, but only if the
|
||||
# image field doesn't have width and height cache fields.
|
||||
if not self.width_field:
|
||||
setattr(cls, 'get_%s_width' % self.name, curry(cls._get_FIELD_width, field=self))
|
||||
if not self.height_field:
|
||||
|
|
|
@ -131,11 +131,12 @@ class AutomaticManipulator(Manipulator):
|
|||
if child_follow:
|
||||
obj_list = expanded_data[related.var_name].items()
|
||||
obj_list.sort(lambda x, y: cmp(int(x[0]), int(y[0])))
|
||||
params = {}
|
||||
|
||||
# For each related item...
|
||||
for _, rel_new_data in obj_list:
|
||||
|
||||
params = {}
|
||||
|
||||
# Keep track of which core=True fields were provided.
|
||||
# If all core fields were given, the related object will be saved.
|
||||
# If none of the core fields were given, the object will be deleted.
|
||||
|
@ -329,4 +330,3 @@ def manipulator_validator_unique_for_date(from_field, date_field, opts, lookup_t
|
|||
format_string = (lookup_type == 'date') and '%B %d, %Y' or '%B %Y'
|
||||
raise validators.ValidationError, "Please enter a different %s. The one you entered is already being used for %s." % \
|
||||
(from_field.verbose_name, date_val.strftime(format_string))
|
||||
|
Loading…
Reference in New Issue