#13361 closed (fixed)
If admin actions are disabled, admin jQuery is not included (thus e.g. prepopulated_fields breaks)
Reported by: | Carl Meyer | Owned by: | Carl Meyer |
---|---|---|---|
Component: | contrib.admin | Version: | dev |
Severity: | Keywords: | jquery | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
ModelAdmin currently only includes jQuery in its media definition if there are admin actions defined (this must be a holdover from a time when only admin actions used jQuery?). Because of the site-wide "delete" action, this usually makes no difference. But if you create a ModelAdmin with explicit "actions = None", all jQuery-dependent admin JS breaks: this includes at least prepopulated_fields.
Attachments (1)
Change History (6)
comment:1 by , 15 years ago
by , 15 years ago
Attachment: | 13361_r12995.diff added |
---|
comment:2 by , 15 years ago
Has patch: | set |
---|
comment:3 by , 15 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:4 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Related: when Django 1.2 ships, it should be clear to reusable app authors whether the namespaced django.jquery is private and not-to-be-relied-upon, or is reliable for reusable-app use and guaranteed to be present on ModelAdmin pages. Per discussion with jezdez on IRC, it will be the latter. I'll attach a patch that makes Django's admin jQuery always included, fixing this bug, and includes a documentation note about the admin's namespaced jquery.