Configurable request parsing.
This ticket if for implementing a request parsing API that ensures the Request
objects can nicely handle JSON and other submitted types in addition the the existing multipart parsing.
The proposed API is based on this discussion: https://groups.google.com/forum/#!searchin/django-developers/request.DATA/django-developers/s8OZ9yNh-8c/oCbNL5x6avAJ
request.DATA
or request.data
for accessing the parsed data.
request.parsers
or similar for modifying the parsers prior to parsing on a per-view basis.
request.accepted_parser
or similar for branching on media type if needed.
- A setting
REQUEST_PARSERS
or similar, that controls the default set of installed parsers.
Change History (8)
Triage Stage: |
Unreviewed →
Accepted
|
Cc: |
antonis+djangoproject.com@… added
|
Owner: |
changed from nobody to Tom Christie
|
Status: |
new →
assigned
|
Owner: |
Tom Christie deleted
|
Status: |
assigned →
new
|
https://github.com/django/deps/blob/master/draft/content-negotiation.rst
reading the DEP
my thoughts are wouldn't it better/nicer to handle the content negotiation per view based content negotiation? and there should be decorators to handle content negotiation in view level?
+ is it really necessary to introduce new global settings?