Add an Item-Content-Type header to Web API responses for list resources.

Review Request #3172 — Created July 3, 2012 and submitted — Latest diff uploaded

Information

Djblets
release-0.6.x

Reviewers

Added an Item-Content-Type header to Web API responses for list resources. This header provides the mime-type for the item resource of the list.

Introduces a new 'allowed_mimetypes' attribute to WebAPIResources, and starts the process of deprecating 'allowed_list_mimetypes', and 'allowed_item_mimetypes'. Any items missing from 'allowed_mimetypes' found in 'allowed_list_mimetypes', or 'allowed_item_mimetypes' will be appended during initialization to be backwards compatible.
Wrote new test cases to check the generated Item-Content-Type header, ran all Djblets tests, and manually tested in a web browser.

Diff Revision 3

This is not the most recent revision of the diff. The latest diff is revision 4. See what's changed.

orig
1
2
3
4
djblets/webapi/resources.py
djblets/webapi/tests.py
Loading...