Opened 17 years ago

Closed 17 years ago

#4386 closed (duplicate)

docs/newforms.txt: Explain custom cleaning/validation

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

Description

Hi,

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@…> 17 years ago.

Download all attachments as: .zip

Change History (3)

by Thomas Güttler <hv@…>, 17 years ago

Attachment: newforms-cleanmethod.diff added

comment:1 by Gary Wilson <gary.wilson@…>, 17 years ago

Patch needs improvement: set
Triage Stage: UnreviewedAccepted

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 by Malcolm Tredinnick, 17 years ago

Resolution: duplicate
Status: newclosed

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