Ticket #16887: update_view.patch

File update_view.patch, 670 bytes (added by linovia, 4 years ago)
  • django/views/generic/edit.py

     
    8686                # Try to get a queryset and extract the model class
    8787                # from that
    8888                model = self.get_queryset().model
    89             return model_forms.modelform_factory(model)
     89            fields = getattr(self, 'fields', None)
     90            exclude = getattr(self, 'exclude', None)
     91            return forms.models.modelform_factory(model, fields=fields, exclude=exclude)
    9092
    9193    def get_form_kwargs(self):
    9294        """
Back to Top