Ticket #7289: modelform_attribute_removal.diff
| File modelform_attribute_removal.diff, 0.7 kB (added by Daniel Pope <dan@mauveinternet.co.uk>, 2 years ago) |
|---|
-
django/newforms/models.py
old new 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.
