[Answer]-Django view replace dict value – list indices must be integers, not str

1👍

✅

As I mentioned in the commment-

data is the bit of info from request.DATA[‘owner_name’], which is a string.

Tring to access data[‘another string’] will not work.

you want data = request.DATA instead.

EDIT

Sorry- I forgot that request.DATA was immutable. You need to do

data = request.DATA.copy()

Leave a comment