Ticket #7342: 7342-r7568.diff
File 7342-r7568.diff, 973 bytes (added by , 16 years ago) |
---|
-
django/db/models/options.py
56 56 # Next, apply any overridden values from 'class Meta'. 57 57 if self.meta: 58 58 meta_attrs = self.meta.__dict__.copy() 59 del meta_attrs['__module__'] 60 del meta_attrs['__doc__'] 59 for name in self.meta.__dict__: 60 # Ignore any private attributes that Django doesn't care about. 61 # NOTE: We can't modify a dictionary's contents while looping 62 # over it, so we loop over the *original* dictionary instead. 63 if name.startswith('_'): 64 del meta_attrs[name] 61 65 for attr_name in DEFAULT_NAMES: 62 66 if attr_name in meta_attrs: 63 67 setattr(self, attr_name, meta_attrs.pop(attr_name))