Code

Opened 6 years ago

Closed 6 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: UI/UX:

Description

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 6 years ago.
Add missing custom js handling

Download all attachments as: .zip

Change History (3)

Changed 6 years ago by mrts

Add missing custom js handling

comment:1 Changed 6 years ago by anonymous

  • Needs documentation set
  • Needs tests set
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Ready for checkin

comment:2 Changed 6 years ago by jkocherhans

  • Resolution set to invalid
  • Status changed from new to closed

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. :)

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.