Opened 7 years ago

Closed 7 years ago

#16582 closed Bug (invalid)

InlineModelAdmin subclass does not respect the 'extra' field

Reported by: Peter Mott Owned by: nobody
Component: contrib.admin Version: 1.3
Severity: Normal Keywords:
Cc: peter@… Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


Upgrading from Django 1.x to Django 1.3 I needed to change the class below setting extra=0 in order to obtain 1 extra field. When extra was 1 then 2 extra fields were shown, when extra was 3 then 4 extra fields were shown etc. The max_num was respected.

class MyInlineModelAdmin(InlineModelAdmin):           
    template = "admin/projects/project/tabular.html"
    extra = 1  # shows 2 extra fields
    max_num = 6
    formfield_overrides = {
        models.ImageField: {'widget': ThumbnailWidget},

Change History (2)

comment:1 Changed 7 years ago by Peter Mott

Cc: peter@… added

comment:2 Changed 7 years ago by Peter Mott

Resolution: invalid
Status: newclosed

The error occured because of my use of a custom tabular.html The issue was fixed when I used the tabular.html with the distribution.

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