Opened 14 years ago

Closed 14 years ago

Last modified 13 years ago

#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)

13361_r12995.diff (2.4 KB ) - added by Carl Meyer 14 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 by Carl Meyer, 14 years ago

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.

by Carl Meyer, 14 years ago

Attachment: 13361_r12995.diff added

comment:2 by Carl Meyer, 14 years ago

Has patch: set

comment:3 by Russell Keith-Magee, 14 years ago

Triage Stage: UnreviewedAccepted

comment:4 by Jannis Leidel, 14 years ago

Resolution: fixed
Status: newclosed

(In [12997]) Fixed #13361 - Made sure jQuery is always included in the admin changelist and changeform. Thanks to Carl Meyer for report and patch.

comment:5 by Jacob, 13 years ago

milestone: 1.2

Milestone 1.2 deleted

Note: See TracTickets for help on using tickets.
Back to Top