Opened 18 years ago

Closed 18 years ago

#3972 closed (fixed)

Outdated newforms save_instance docstring

Reported by: anonymous Owned by: Adrian Holovaty
Component: Forms Version: dev
Severity: Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I'm new but isn't the comment:

"Assumes form has a field for *every non-AutoField* database field in
instance. If commit=True, then the changes to instance will be
saved to the database. Returns instance.
" confusing if you exclude fields with the condition in the line below (or not f.name f.e.)

if not f.editable or isinstance(f, models.AutoField) or not f.name in clean_data:

Thanks

Attachments (1)

save_instance_docstring.patch (700 bytes ) - added by Chris Beaven 18 years ago.

Download all attachments as: .zip

Change History (4)

comment:1 by Chris Beaven, 18 years ago

Summary: newforms save_instance __doc__ confusing?Outdated newforms save_instance docstring
Triage Stage: UnreviewedAccepted

Correct, it doesn't assume this any more. The docstring needs to be updated.

by Chris Beaven, 18 years ago

comment:2 by Chris Beaven, 18 years ago

Has patch: set
Triage Stage: AcceptedReady for checkin

comment:3 by Malcolm Tredinnick, 18 years ago

Resolution: fixed
Status: newclosed

(In [5471]) Fixed #3972 -- Updated docstring. Patch from SmileyChris.

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