Opened 7 years ago

Closed 7 years ago

Last modified 5 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 7 years ago by mattmcc

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to invalid
  • Status changed from new to closed

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

comment:2 Changed 5 years ago by jacob

  • milestone 1.2 deleted

Milestone 1.2 deleted

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