Django

Code

Ticket #2159 (closed: invalid)

Opened 2 years ago

Last modified 1 year ago

dropdowns defaulting to a lone value cause edit_inline objects with core=True to try to be saved

Reported by: Gary Wilson <gary.wilson@gmail.com> Assigned to: nobody
Milestone: Component: django.contrib.admin
Version: SVN Keywords:
Cc: gary.wilson@gmail.com Triage Stage: Design decision needed
Has patch: 0 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

Normally, defaulting to a value when it is the only selection option is fine; however, it is annoying when the object is being edited inline of the related object (even more annoying with the default of three related objects displayed). This is because, on save, the form thinks you are trying to enter an entry for the inline object when, in fact, you are not. This behavior will be seen for ForeignKey fields and CharFields using the choices parameter. They must also have core=True.

In order to have the edit_inline objects not try to get saved, user must change the selection to "---------" for each object before saving. Either "---------" should always be the default (even when there is only one selection option), or "---------" should be the default when the object is edited inline

Attachments

Change History

07/20/06 11:16:50 changed by Gary Wilson <gary.wilson@gmail.com>

  • cc set to gary.wilson@gmail.com.

02/27/07 12:53:49 changed by Gary Wilson <gary.wilson@gmail.com>

  • stage changed from Unreviewed to Design decision needed.

11/30/07 15:34:43 changed by jacob

  • status changed from new to closed.
  • resolution set to invalid.

Luckily, thankfully, there's no such thing as the horrific "core" in newforms admin, so we don't have to figure out what the hell's going on here :)


Add/Change #2159 (dropdowns defaulting to a lone value cause edit_inline objects with core=True to try to be saved)




Change Properties
Action