The thing is that all the inline model fields are read-only. I also tried
to mark them using `has_change_permission` override to false. It also has
{{{
extra = 0
max_num = 0
can_delete = False
}}}
so no new can be added or deleted. but that didn't seem to work. I still
see in POST request all the PK (and FK) being sent like below.
orders-0-id: 6769275
orders-0-customer: 165326
orders-1-id: 6658512
orders-1-customer: 165326
orders-2-id: 6550069
orders-2-customer: 165326
orders-3-id: 6446255
orders-3-customer: 165326
Is there any reason these need to be sent if inline model is readonly
through and through? Or is there a way to mark inline as completely
readonly?
--
Ticket URL: <https://code.djangoproject.com/ticket/32680>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* status: new => closed
* type: Bug => New feature
* resolution: => wontfix
Comment:
Admin inlines are for editing models on the same page as a parent model
not for displaying extra details, what as far as I'm aware your trying to
achieve.
You can try to use
[https://docs.djangoproject.com/en/dev/ref/contrib/admin/#django.contrib.admin.ModelAdmin.readonly_fields
ModelAdmin.readonly_fields] and render related table on your own or ask on
one of
[https://code.djangoproject.com/wiki/TicketClosingReasons/UseSupportChannels
support channels] for other solutions.
--
Ticket URL: <https://code.djangoproject.com/ticket/32680#comment:1>