Commit Graph

25 Commits

Author SHA1 Message Date
Valentin Deniaud 40142de8d2 misc: apply double-quote-string-fixer (#79788) 2023-08-16 10:08:30 +02:00
Valentin Deniaud 347944babf misc: remove usage of "six" module (#63682) 2022-04-20 17:01:01 +02:00
Lauréline Guérin dd7111f33b
misc: fix no-self-argument pylint error (#62099) 2022-03-25 09:03:38 +01:00
Lauréline Guérin 928086b47e
misc: fix function-redefined pylint error (#62099) 2022-03-25 09:03:36 +01:00
Lauréline Guérin dbb8416537
misc: add __init__ file to tests dir (#62099) 2022-03-25 08:24:24 +01:00
Thomas NOËL 67971d6d79 jsonresponse: do not crash on bad raise format (#59119) 2021-11-30 16:40:00 +01:00
Benjamin Dauvergne 4b574ff0c9 utils/jsonresponse: prevent Django from logging our 500 responses as errors (#56139) 2021-08-13 15:34:39 +02:00
Nicolas Roche 06db6d8767 misc: apply isort (#52937) 2021-05-07 13:51:13 +02:00
Frédéric Péters 3d9df1e526 trivial: apply black (#49820) 2021-02-20 16:28:47 +01:00
Emmanuel Cazenave ae09ae97b6 use json_loads() instead of json.loads() (#38781)
json.loads expects str in python >= 3, < 3.6.
2020-01-29 10:30:47 +01:00
Emmanuel Cazenave 16836c5e26 test jsonresponse: compare binary content to binary data (#38781) 2020-01-29 10:30:46 +01:00
Emmanuel Cazenave f9b0a99e0e tests: use absolute imports (#38923)
And delete some __init__.py in tests directory.
2020-01-14 19:20:26 +01:00
Frédéric Péters b40ba221e0 tests: adapt to logging changes 2018-08-17 15:22:25 +02:00
Serghei Mihai 3f35e2dc35 tests: use caplog.records property (#20314) 2017-11-28 11:12:16 +01:00
Frédéric Péters 5a43433e67 jsonresponse: remove unused serializers from to_json decorator (#17175) 2017-06-30 10:02:23 +02:00
Frédéric Péters 2eeeeb747c general: switch to json-api/wrap_response:False as endpoint default (#17175) 2017-06-30 10:02:23 +02:00
Frédéric Péters e39eeaf6d2 general: don't automatically set x-error-code (#16856) 2017-06-25 12:22:37 +02:00
Serghei fe69f752c4 jsonresponse: fix HTTP status code for Http404 exceptions (#17097) 2017-06-22 06:47:24 +02:00
Serghei Mihai c41855ddb6 to_json: check callback name syntax (#13577) 2016-11-18 15:33:47 +01:00
Serghei Mihai 4e4c3a409c to_json: handle jsonp callbacks (#13577) 2016-11-18 15:33:47 +01:00
Benjamin Dauvergne 6fc15de798 misc: add @endpoint option to *not* wrap the answer in 'data' key (#13576) 2016-11-18 15:33:47 +01:00
Jean-Baptiste Jaillet 3a4486f88d jsonresponse: add http header for error (#12924) 2016-09-07 11:28:26 +02:00
Benjamin Dauvergne 5fb8d121e4 allow exception in api endpoints to prevent logging of tracebacks (fixes #12582) 2016-07-15 14:06:28 +02:00
Serghei Mihai 3c80c165af jsonresponse: don't log exceptions for Http404, PermissionDenied and ObjectDoesnotExist (#11058) 2016-05-26 15:56:07 +02:00
Serghei Mihai 9ba00c7024 embed jsonresponse into the package (#10283) 2016-04-13 18:02:42 +02:00