Comment (by googol):
I'd like to vote for this feature as it is crucial for our projects.
Without it customers have to edit the entities first (City) they will
refer to in other models (Person) which is very bad from a usability point
of view!
--
Ticket URL: <https://code.djangoproject.com/ticket/11803#comment:5>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Comment (by roland):
second vote
--
Ticket URL: <https://code.djangoproject.com/ticket/11803#comment:6>
* cc: aaboffill@… (added)
Comment:
I think that is a little difficult to find a simple and elegant way to fix
this ticket.
The `Select` fields are updated in `RelatedObjectLookups.js` when the
popup is closed after to add the new record. In order to update all fields
related with the same `model`, is necessary to have at least something to
identify all `HTML` elements with the same `model`, something like `data-
model-ref=""`. Now this is a little more easy with the new `template-based
widget rendering`, because is easy to add the attribute to the `template`.
But to make this simple change in the template, is necessary to update all
tests related with the html content of widgets. And I don't know if to
add a new attribute to the field widget template it's finally convenient
or worthwhile.
If finally to add something like `data-model-ref=""` in the field widget
template is not a bad idea, I can work on a solution.
--
Ticket URL: <https://code.djangoproject.com/ticket/11803#comment:7>
* owner: nobody => Marcelo Galigniana
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/11803#comment:8>
* has_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/11803#comment:9>
* version: 1.1 => dev
--
Ticket URL: <https://code.djangoproject.com/ticket/11803#comment:10>
* needs_better_patch: 0 => 1
Comment:
The suggest patch looks kind of neat, so 👍
I think `limit_choices_to` (and maybe other wiggles) need consideration
for it to be 100%
--
Ticket URL: <https://code.djangoproject.com/ticket/11803#comment:11>
* needs_better_patch: 1 => 0
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/11803#comment:12>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"c72f6f36c13a21f6db3d4f85d2d3cec87bad45e6" c72f6f3]:
{{{
#!CommitTicketReference repository=""
revision="c72f6f36c13a21f6db3d4f85d2d3cec87bad45e6"
Fixed #11803 -- Allowed admin select widgets to display new related
objects.
Adjusted admin javascript to add newly created related objects to
already loaded select widgets.
In this version, applies only where limit_choices_to is not set.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/11803#comment:13>