Login

Tag "init"

Snippet List

Adding a field to a newform in __init__

When adding fields in the __init__ of a newform, and you don't want the fields to be added *after* the class-attribute fields, this is a possibility... This is a bad example as the email_from could just as well have been defined as a class variable!

  • newforms
  • field
  • init
Read More

1 snippet posted so far.