smwilsonau
smwilsonau

Reputation: 199

Why has the "Add another" button disappeared from my django inlines when upgrading to 1.6?

I have a django site with lots of inlines in the admin interface. On the previous version of django that I was using, there was an "Add another" button to add more entries. I upgraded to django 1.6 and this button has disappeared. Here is the relevant part of my admin.py:

class MyInline(admin.TabularInline):
  extra = 0

Note that extra = 0 because I don't want to display anything unless there actually is one or more entry.

I also tried adding max_num = 9999, based on some posts I saw, but that didn't help.

I understand the "Add another" button is implemented with JavaScript. Can anyone explain why the "Add another" button has gone, and more importantly, what I can to do get it back?

Thanks a lot.

Upvotes: 2

Views: 1152

Answers (1)

smwilsonau
smwilsonau

Reputation: 199

It turned out that the problem was caused by copying the static admin files from the previous version of my project (from an earlier version of django). Once I recopied the static admin files from the current version, the "Add another" buttons are back.

Upvotes: 3

Related Questions