Groups
Groups
Sign in
Groups
Groups
Django users
Conversations
About
Send feedback
Help
ModelForm save() cleans data first?
3 views
Skip to first unread message
Continuation
unread,
Dec 1, 2009, 9:14:47 PM
12/1/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Django users
When a ModelForm object calls save(), does it first clean the form
data using form.cleaned_data? Or do I need to call form.cleaned_data
explicitly?
Skylar Saveland
unread,
Dec 1, 2009, 11:47:28 PM
12/1/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Django users
Former
Skylar Saveland
unread,
Dec 1, 2009, 11:54:15 PM
12/1/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Django users
Wait, this is a better question than I thought on first glance. Not
entirely sure, sorry for the terse first response.
Jani Tiainen
unread,
Dec 2, 2009, 2:16:23 AM
12/2/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django...@googlegroups.com
Saving checks form.errors which (as being property) in turn causes call
to form.full_clean() to generate internal error structure.
So answer is yes, it cleans data if it hasn't been cleaned before
calling save.
--
Jani Tiainen
Reply all
Reply to author
Forward
0 new messages