Skip to content

Instantly share code, notes, and snippets.

@nezort11
Created September 13, 2021 21:05
Show Gist options
  • Select an option

  • Save nezort11/14b3802873fa7cf64273aedc07db2634 to your computer and use it in GitHub Desktop.

Select an option

Save nezort11/14b3802873fa7cf64273aedc07db2634 to your computer and use it in GitHub Desktop.
Django Form Fields

Form and fields

form.fields: (BoundField) 1. form.visible_fields (BoundField) - not field.is_hidden 2. form.hidden_fields (BoundField) - field.is_hidden

form.iter = form.fields form.field_name = FloatField (UnBoundField)

BoundField:

  • data
  • fields
  • ...

form.errors:

  1. form.add_error (form.has_error)
  2. field.errors
  3. form.non_field_errors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment