Opened 9 years ago

Closed 9 years ago

#4386 closed (duplicate)

docs/newforms.txt: Explain custom cleaning/validation

Reported by: Thomas Güttler <hv@…> Owned by: jacob
Component: Documentation Version: master
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: UI/UX:



here is a patch to document he custom cleaning method clean_FIELDNAME()

Attachments (1)

newforms-cleanmethod.diff (1009 bytes) - added by Thomas Güttler <hv@…> 9 years ago.

Download all attachments as: .zip

Change History (3)

Changed 9 years ago by Thomas Güttler <hv@…>

comment:1 Changed 9 years ago by Gary Wilson <gary.wilson@…>

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement set
  • Triage Stage changed from Unreviewed to Accepted

By the time clean_first_name gets called, you can access the value in cleaned_data:

value = self.cleaned_data['first_name']

but this could change slightly if #4391 gets fixed.

comment:2 Changed 9 years ago by mtredinnick

  • Resolution set to duplicate
  • Status changed from new to closed

Thanks, Thomas. I'll combine an example like yours with #4473 (which discusses the whole cleaning process) when I apply that.

Note: See TracTickets for help on using tickets.
Back to Top