Opened 18 years ago

Closed 18 years ago

#2757 closed defect (duplicate)

[patch] new-admin changes for manipulators are not being used in documentation

Reported by: Gary Wilson <gary.wilson@…> Owned by: Jacob
Component: Documentation Version: dev
Severity: normal Keywords:
Cc: gary.wilson@… Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I know manipulators in their current form are going away soon, but until then the documentation could be correct, yes? Many users seem to be facing the problem of their ForeignKey fields not getting set correctly, and this is because the "Forms, fields, and manipulators" documentation is out-of-date.

Attachments (1)

docs.diff (3.0 KB ) - added by Gary Wilson <gary.wilson@…> 18 years ago.

Download all attachments as: .zip

Change History (6)

by Gary Wilson <gary.wilson@…>, 18 years ago

Attachment: docs.diff added

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

Component: Admin interfaceDocumentation
Owner: changed from Adrian Holovaty to Jacob

The flatten_data() part of this looks like it was taken care of in [3758].

comment:2 by Malcolm Tredinnick, 18 years ago

What are you trying to achieve by moving the call to do_html2python() outside of the "if errors:..." check?

You can't actually do that. As documented in the docstring for do_html2python, field convertors are not intended to handle input with errors and it unconditionally converts all fields. That is why it should only be called if there are no errors (plus, you aren't going to go about saving the data if it has validation errors, one would assume). So what's the problem that that of the patch is trying to fix?

comment:3 by Gary Wilson <gary.wilson@…>, 18 years ago

I was just going by the documentation at NewAdminChanges#ViewFunctions. I didn't look at the code though to see what html2python expected or if it's needed to redisplay the data properly or what; however, the admin add/change stages [source:/django/trunk/django/contrib/admin/views/main.py here] seem to make the call to do_html2python outside of the if not errors check also.

comment:4 by Malcolm Tredinnick, 18 years ago

Yeah, okay. I'll buy that reasoning. Seems pretty clearly documented there.

comment:5 by Gary Wilson <gary.wilson@…>, 18 years ago

Resolution: duplicate
Status: newclosed

Marking this a dup of #3005 since that ticket has an updated patch (the flatten_data() was already fixed in [3758]).

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