Login

Tag "ignore"

Snippet List

ingore_fields

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. Typical use: `form_class = form_for_instance(obj, fields=ignore_fields(model_class, ['field_name1']))`

  • newforms
  • fields
  • ignore
Read More

1 snippet posted so far.