Opened 8 years ago

Closed 8 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: master
Severity: normal Keywords:
Cc: gary.wilson@… Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

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

Download all attachments as: .zip

Change History (6)

Changed 8 years ago by Gary Wilson <gary.wilson@…>

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

  • Component changed from Admin interface to Documentation
  • Owner changed from adrian to jacob

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

comment:2 Changed 8 years ago by mtredinnick

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 Changed 8 years ago by Gary Wilson <gary.wilson@…>

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 Changed 8 years ago by mtredinnick

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

comment:5 Changed 8 years ago by Gary Wilson <gary.wilson@…>

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

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