Thursday, August 4, 2016

django admin - how to override add new row in an inlined formset

Leave a Comment

I've customised my inlined model using the Media class. I want to customize the inlined field sets to achieve 2 things:

  • add a button to each row
  • run from javascript code when "add new row" is pressed

I've tried overriding tabular.html and no matter where I put the overriden template, it does not make any difference.

From playing with the change_form.html I can say that I need to override inline_admin_formset.opts.template but I do not know how. Any ideas?

enter image description here

0 Answers

If You Enjoyed This, Take 5 Seconds To Share It

0 comments:

Post a Comment