У меня проблемы с получением данных о публикации запроса:
curl 'http://127.0.0.1:8005/api/curricula_report/v1/report-data/?format=json' --data-binary '{"storesIds":[80403,66729,66996,67355,67393,67405,67406,67417,67439,67690,67713,67780,67851,68060,68082,68224,68305,68338,68414,68422,68437,68508,68513,68542,69004,69131,69516,69693,69845,69886,69887,69890,69954,69960,69976,70025,70102,70151,70166,70273,70334,70493,70512,70632,70696,70864,70991,71099,71415,71551,71572,71693,71926,71979,72478,72830,72846,72848,72872,72881,73202,73253,73326,73337,73363,73364,73382,73452,73463,73674,73683,73776,78997,73909,74666,73921,73989,77485,77538,77843,78135,77902,77833,78961,79238,80106,79239,79785,80914,81129,80800,81115,80520,80521,80801,81825,81659,82441,83128,74489],"courseIds":["3f8c8bd7-5aae-4184-a824-68edf528a011"],"audienceId":2,"hiredId":1,"user":"TW9oYW1tYWQ7UmhhbWFuO21vaGFtbWFkcmhhbWFuO21vaGFtbWFkcmhhbWFuO21vaGFtbWFkQGRla2tncm91cC5jb207ZHVua2luYnJhbmRzOzIwMTgtMDctMDNUMTE6MjE6MzhaO0M3RDVCMUZEOUExN0RFNDEyNUVDODJBRTEzOTFEQ0E5N0M4Q0VFNUM"}' --compressed
при проверке запроса через ipdb:
def post(self, request, *args, **kwargs):
post_data_dict = request.data
user_token = post_data_dict.get('user', None)
пользователь всегда None.
ipdb> post_data_dict
<QueryDict: {u'{"storesIds":[80403,66729,66996,67355,67393,67405,67406,67417,67439,67690,67713,67780,67851,68060,68082,68224,68305,68338,68414,68422,68437,68508,68513,68542,69004,69131,69516,69693,69845,69886,69887,69890,69954,69960,69976,70025,70102,70151,70166,70273,70334,70493,70512,70632,70696,70864,70991,71099,71415,71551,71572,71693,71926,71979,72478,72830,72846,72848,72872,72881,73202,73253,73326,73337,73363,73364,73382,73452,73463,73674,73683,73776,78997,73909,74666,73921,73989,77485,77538,77843,78135,77902,77833,78961,79238,80106,79239,79785,80914,81129,80800,81115,80520,80521,80801,81825,81659,82441,83128,74489],"courseIds":["3f8c8bd7-5aae-4184-a824-68edf528a011"],"audienceId":2,"hiredId":1,"user":"TW9oYW1tYWQ7UmhhbWFuO21vaGFtbWFkcmhhbWFuO21vaGFtbWFkcmhhbWFuO21vaGFtbWFkQGRla2tncm91cC5jb207ZHVua2luYnJhbmRzOzIwMTgtMDctMDNUMTE6MjE6MzhaO0M3RDVCMUZEOUExN0RFNDEyNUVDODJBRTEzOTFEQ0E5N0M4Q0VFNUM"}': [u'']}>
не уверен, что я делаю неправильно, все ключи, кажется, опущены, и значения тоже:
ipdb> post_data_dict.keys()
[u'{"storesIds":[80403,66729,66996,67355,67393,67405,67406,67417,67439,67690,67713,67780,67851,68060,68082,68224,68305,68338,68414,68422,68437,68508,68513,68542,69004,69131,69516,69693,69845,69886,69887,69890,69954,69960,69976,70025,70102,70151,70166,70273,70334,70493,70512,70632,70696,70864,70991,71099,71415,71551,71572,71693,71926,71979,72478,72830,72846,72848,72872,72881,73202,73253,73326,73337,73363,73364,73382,73452,73463,73674,73683,73776,78997,73909,74666,73921,73989,77485,77538,77843,78135,77902,77833,78961,79238,80106,79239,79785,80914,81129,80800,81115,80520,80521,80801,81825,81659,82441,83128,74489],"courseIds":["3f8c8bd7-5aae-4184-a824-68edf528a011"],"audienceId":2,"hiredId":1,"user":"TW9oYW1tYWQ7UmhhbWFuO21vaGFtbWFkcmhhbWFuO21vaGFtbWFkcmhhbWFuO21vaGFtbWFkQGRla2tncm91cC5jb207ZHVua2luYnJhbmRzOzIwMTgtMDctMDNUMTE6MjE6MzhaO0M3RDVCMUZEOUExN0RFNDEyNUVDODJBRTEzOTFEQ0E5N0M4Q0VFNUM"}']
ipdb> post_data_dict.values()
[u'']
с rest_framework v 3.1.3 это работало.
любая помощь в этом?