Opened 9 years ago

Closed 9 years ago

Last modified 7 years ago

#11977 closed (invalid)

The media files in ModelAdmin should be just link in add/change pages, not changelist page.

Reported by: anonymous Owned by: nobody
Component: contrib.admin Version: 1.1
Severity: Keywords: admin media
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


In file, I write a ModelAdmin class, and add a Media class to link extend css and js file:

class AccountSmsAdmin(admin.ModelAdmin):
    class Media:
        css = {"all":("aaa.css",)}
        js = ("js/jquery-1.3.2.min.js", "js/change_sms.js",)

I find theses css and js file not only link in add/change page(,, but also in change list page . it's not correct.

Change History (2)

comment:1 Changed 9 years ago by Matt McClanahan

Resolution: invalid
Status: newclosed

If you want to specify media which only appears on the change page, you can use a custom form class.

comment:2 Changed 7 years ago by Jacob

milestone: 1.2

Milestone 1.2 deleted

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