#32680: Django admin does not need to send PK and FK of inline model back in
POST
request on save
-----------------------------------------+------------------------
Reporter: dave-kong | Owner: nobody
Type: Bug | Status: new
Component: contrib.admin | Version: 2.2
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-----------------------------------------+------------------------
I have Inline models that lists a lot of rows, and on save, it causes an
error due to DATA_UPLOAD_MAX_NUMBER_FIELDS being exceeded. I can increase
this setting to a much larger number, but that reduces the benefit of it
to catch SuspiciousOperations.
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.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/052.5b0ca84aa8edcb37e7da852d808c2a74%40djangoproject.com.