Opened 11 years ago

Closed 11 years ago

#6619 closed (invalid)

Add custom javascript missing from newforms-admin (js field missing)

Reported by: mrts Owned by: nobody
Component: contrib.admin Version: newforms-admin
Severity: Keywords: javascript
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: yes
Needs tests: yes Patch needs improvement: no
Easy pickings: no UI/UX: no


Old admin interface had a way to add custom javascript to models in admin:

class MyModel(models.Model):
   class Admin:
      js = [ 'foo' ]

This functionality was missing, the attached patch adds the same functionality back:

class MyModel(models.Model):

class MyModelAdmin(admin.ModelAdmin):
   js = [ 'foo' ]

It's a simple patch and should generally be ready for checkin.

Attachments (1)

add_js.diff (958 bytes) - added by mrts 11 years ago.
Add missing custom js handling

Download all attachments as: .zip

Change History (3)

Changed 11 years ago by mrts

Attachment: add_js.diff added

Add missing custom js handling

comment:1 Changed 11 years ago by anonymous

Needs documentation: set
Needs tests: set
Triage Stage: UnreviewedReady for checkin

comment:2 Changed 11 years ago by jkocherhans

Resolution: invalid
Status: newclosed

Javascript in the admin is taken care of by the new inner Media class in newforms-admin. It's even documented, albeit hard to know about if you haven't been watching the branch for a long time. :)

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