djangosnippets.org: Latest snippets tagged with 'ignore'https://djangosnippets.org/tags/ignore/2007-11-04T02:04:46.255731-06:00ingore_fields
2007-11-04T02:04:46.255731-06:00RealNitrohttps://djangosnippets.org/snippets/456/<p>I use this snippet when creating newforms with form_for_model and form_for_instance. Both do not have an argument that lets you filter out fields easily so I wrote this instead.</p>
<p>Typical use:</p>
<p><code>form_class = form_for_instance(obj, fields=ignore_fields(model_class, ['field_name1']))</code></p>
Freely redistributable