Commit Graph

19 Commits

Author SHA1 Message Date
Carlton Gibson
0407a0df8a
Dropped Python 2 compatibility. (#6615)
Thanks to Jon Dufresne (@jdufresne) for review.

Co-authored-by: Asif Saif Uddin <auvipy@gmail.com>
Co-authored-by: Rizwan Mansuri <Rizwan@webbyfox.com>
2019-04-30 17:53:44 +02:00
Dmitry Dygalo
e1768bdc16 Fixed various typos (#4366) 2016-08-08 09:32:22 +01:00
Tom Christie
c64896c849 More cleanup of browser overrides 2015-09-28 15:33:55 +01:00
José Padilla
7351a3f6ca Sort imports with isort 2015-06-25 16:55:51 -04:00
José Padilla
83c9136c90 Cleanup import following PEP 8 style guide 2015-06-25 16:10:17 -04:00
Nicolas Delaby
63511c03d0 Check AcceptHeaderVersioning with content negotiation in place 2015-04-23 14:19:39 +02:00
Tom Christie
2859eaf524 request.data attribute 2014-09-26 10:46:52 +01:00
Tom Christie
bf09c32de8 Code linting and added runtests.py 2014-08-19 13:28:07 +01:00
Tom Christie
0d3d66cb02 Added proper charset support 2013-05-18 17:21:43 +01:00
Karol Majta
ebe959b52a charset param gets now appended to response's Content-Type. Closes #807 2013-05-18 16:45:05 +02:00
Tom Christie
95abe6e844 Cleanup docstrings 2013-04-25 12:47:34 +01:00
Tom Christie
b052c92ac3 Cleanup imports
Mostly adding `from __future__ import unicode_literals` everywhere.
2013-02-04 20:55:35 +00:00
Tom Christie
2c634c0e5c Use request.QUERY_PARAMS internally
(instead of request.GET)
2013-02-04 19:51:31 +00:00
Fabian Büchler
731443b71e Renderer negotiation: media_type specificty evaluation weak
The `DefaultContentNegotiation` handler uses

For example: Google Chrome sends an Accept-header of `Accept:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8`, when I request a *.png URL.
After matching the media-types with the available renderers (in my case only a custom `PNGRenderer` with a `media_type='image/png'`), only `*/*;q=0.8` is left, which happens to have the same length as the "image/png" media-type defined by the renderer (9 characters).

The specificity of the renderer's media-type over the Accept-header's one is only determined by length.
Using your `_MediaType.precedence` would be preferable in my eyes.

Regards, Fabian
2012-11-27 10:13:15 +01:00
Tom Christie
d206c686a6 Fixes for urls with suffixes 2012-10-29 17:08:38 +00:00
Tom Christie
e126b61542 Negotiation API finalized. .select_renderers and .select_parsers 2012-10-17 22:58:18 +01:00
Tom Christie
9d8bce8f5b Remove Parser.can_handle_request() 2012-10-05 14:48:33 +01:00
Tom Christie
d07dc77e91 Accepted media type uses most specific of client/renderer media types. 2012-10-05 10:23:47 +01:00
Tom Christie
4b691c4027 Change package name: djangorestframework -> rest_framework 2012-09-20 13:06:27 +01:00