Opened 6 years ago

Last modified 6 years ago

#29982 closed Bug

Change form fields don't appear on the same as requested in ModelAdmin.fields — at Version 2

Reported by: Artur Ivanov Owned by: nobody
Component: contrib.admin Version: 2.1
Severity: Normal Keywords: model admin
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Tim Graham)

Hello. I've just updated django from 2.0 to 2.1.3 release and I have a problem with django admin site since.
The problem is incorrect html view of model admin fields option.

I have this code in my admin.py

@admin.register(Orders)
class OrdersAdmin(admin.ModelAdmin):
    fields = ('customer', ('order_number', 'order_date'), 'payment_day',
              'products', 'contact_pers', 'contractor', 'is_add_lic',
              'partner')

According to documentation fields order_number" and "order_date" must be on the same line because they're wraped in their own tuple. Вut it's broke since 2.1.0 release, as I guess.

To demostrate what I actually have I attached a couple of screnshots

Change History (4)

by Artur Ivanov, 6 years ago

Attachment: 2018-11-24_00-02-37.png added

by Artur Ivanov, 6 years ago

Attachment: 2018-11-24_00-05-50.png added

comment:1 by Artur Ivanov, 6 years ago

Component: Uncategorizedcontrib.admin

comment:2 by Tim Graham, 6 years ago

Description: modified (diff)
Summary: django model admin fields option has incorrect html viewChange form fields don't appear on the same as requested in ModelAdmin.fields

I haven't been able to reproduce this. Could you give a minimal project that demonstrates the issue? Ideally, you could also bisect to find the commit where the behavior changed.

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