5👍
✅
The default format for Client.post
is multipart. You need to specify json
using the format
parameter:
r = self.client.post(url, data, format='json')
Source:stackexchange.com