maraujop/django-crispy-forms — pull request #37 by jeroenvloothuis (2012-04-18 14:33:03+00:00)
Title: Fix for forms with less fields on instance than listed in Meta.fields

This fixes a problem where I delete fields from a form based on request parameters. I don't list these fields in the layout but crispy forms helpfully adds them to the layout and breaks on render.

This patch uses the .fields attribute from the form instance instead.