#9784 closed (fixed)
Django admin: prepopulated_fields does not update on javascript (calendar) change
| Reported by: | Owned by: | David Gouldin | |
|---|---|---|---|
| Component: | contrib.admin | Version: | 1.0 |
| Severity: | Keywords: | ||
| Cc: | dgouldin@… | Triage Stage: | Accepted |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
I have prepopulated_fields = {'slug':('publication_date',) }, where publication_date is models.DateField.
In admin when I change date via javascript calendar, slug field is not updated. If I change it directly, slug field is updated correctly.
Attachments (2)
Change History (14)
comment:1 by , 17 years ago
| milestone: | → 1.1 |
|---|---|
| Triage Stage: | Unreviewed → Accepted |
comment:2 by , 17 years ago
| Cc: | added |
|---|---|
| Has patch: | set |
comment:3 by , 17 years ago
| Triage Stage: | Accepted → Ready for checkin |
|---|
comment:4 by , 17 years ago
| Owner: | changed from to |
|---|---|
| Patch needs improvement: | set |
by , 17 years ago
comment:6 by , 17 years ago
| Patch needs improvement: | unset |
|---|
Added prepopulate support for MultiWidgets and hooked events for date and time shortcuts.
by , 17 years ago
| Attachment: | 9784.2.diff added |
|---|
comment:8 by , 17 years ago
| Patch needs improvement: | unset |
|---|
comment:9 by , 17 years ago
| milestone: | 1.1 → 1.2 |
|---|
Pushing to 1.2: this is an annoying bug, but it's UI only and has an easy workaround of writing the slug by hand.
comment:10 by , 16 years ago
| milestone: | 1.2 → 1.3 |
|---|
I'm going to bump this off the 1.2 milestone, for a couple reasons:
- There are several tickets (this one, #9110, #9264 and #9983) all exposing cases where the event handling for
prepopulated_fieldsfalls over in specific edge cases, so the real solution is not to fix any of these individually but rather to makeprepopulate_frommore robust. - I suspect the admin-ui work will be coming up for discussion in the 1.3 timeframe, and that's a more solid place to talk about dealing with this.
comment:11 by , 16 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
(In [12937]) Fixed #13068, #9264, #9983, #9784 - regression with pre-populated fields and javascript inlines, and related bugs.
Thanks to hejsan for the report, and to Sean Brant and Carl Meyer for the patch.
#13068 is a regression caused by the new javascript inline forms in the
admin. The others were existing javascript bugs with prepopulated fields.
Since the solution depends on jQuery and would likely be very hard to
backport without it, it will not be backported to 1.1.X.
Need to add support for prepopulated field based on DateTime and hook events on "Today" and "Now" shortcuts.