Opened 14 years ago
Closed 14 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 |
Description
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 by , 14 years ago
| Cc: | added |
|---|
comment:2 by , 14 years ago
| Resolution: | → invalid |
|---|---|
| Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
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.