Opened 4 years ago

Closed 4 years ago

#16582 closed Bug (invalid)

InlineModelAdmin subclass does not respect the 'extra' field

Reported by: peter2108 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 4 years ago by peter2108

  • Cc peter@… added
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

comment:2 Changed 4 years ago by peter2108

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

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