#36069 closed Bug (fixed)
The position of the "X" button for the InlineForm in TabularInline differs depending on the can_delete value.
| Reported by: | Antoliny | Owned by: | Antoliny |
|---|---|---|---|
| Component: | contrib.admin | Version: | dev |
| Severity: | Normal | Keywords: | TabularInline |
| Cc: | Triage Stage: | Ready for checkin | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | yes | UI/UX: | no |
Description
class CommentInline(admin.TabularInline):
model = Comment
extra = 1
can_delete = False
class TagInline(admin.TabularInline):
model = Tag
extra = 1
class PostAdmin(admin.ModelAdmin):
inlines = [CommentInline, TagInline]
When can_delete is set to False in TabularInline, remove button of the InlineForm moves to the bottom (it should be at the top originally).

Attachments (1)
Change History (13)
by , 10 months ago
| Attachment: | tabular_inline_delete_button.png added |
|---|
comment:1 by , 10 months ago
| Owner: | set to |
|---|---|
| Status: | new → assigned |
comment:2 by , 10 months ago
| Summary: | When can_delete is set to False in TabularInline, the position of the remove (X) button for the InlineForm is different. → The position of the "X" button for the InlineForm in TabularInline differs depending on the can_delete value. |
|---|
comment:3 by , 10 months ago
| Has patch: | set |
|---|
comment:4 by , 10 months ago
comment:5 by , 10 months ago
| Triage Stage: | Unreviewed → Accepted |
|---|
Thank you Antoliny! I reproduced in latest main, accepting.
comment:6 by , 10 months ago
| Needs tests: | set |
|---|
Code-wise the PR looks good, I asked for a minimal test to ensure no regressions occur in the template.
comment:7 by , 10 months ago
| Needs tests: | unset |
|---|
comment:8 by , 10 months ago
| Needs tests: | set |
|---|
comment:9 by , 10 months ago
| Needs tests: | unset |
|---|
comment:10 by , 9 months ago
| Triage Stage: | Accepted → Ready for checkin |
|---|
Note:
See TracTickets
for help on using tickets.
PR