Ticket #15282: patch.diff

File patch.diff, 751 bytes (added by coleifer, 14 years ago)

Patch

  • django/forms/models.py

    diff --git a/django/forms/models.py b/django/forms/models.py
    index 2a3f8bd..5bd34e6 100644
    a b class ModelFormMetaclass(type):  
    213213                message = message % (', '.join(missing_fields),
    214214                                     opts.model.__name__)
    215215                raise FieldError(message)
     216           
     217            if parents:
     218                for parent in parents:
     219                    if parent is not ModelForm:
     220                        fields.update(parent.base_fields)
     221           
    216222            # Override default model fields with any custom declared ones
    217223            # (plus, include all the other declared fields).
    218224            fields.update(declared_fields)
Back to Top