Ticket #7289: modelform_attribute_removal.diff
File modelform_attribute_removal.diff, 690 bytes (added by , 16 years ago) |
---|
-
django/newforms/models.py
224 224 return super(ModelFormMetaclass, cls).__new__(cls, name, bases, 225 225 attrs) 226 226 227 declared_fields = get_declared_fields(bases, attrs, False) 227 228 new_class = type.__new__(cls, name, bases, attrs) 228 declared_fields = get_declared_fields(bases, attrs, False)229 229 opts = new_class._meta = ModelFormOptions(getattr(new_class, 'Meta', None)) 230 230 if opts.model: 231 231 # If a model is defined, extract form fields from it.