skorokithakis/django-annoying — pull request #3 by benbacardi (2013-06-04 13:40:01+00:00)
Title: New accept_header_response

I've added a new decorator that I find quite useful in a number of situations (particularly when writing APIs etc).

Similar to the ajax_response decorator, in that it takes a dictionary or list returned from the view, but it will try and format the response in a way that matches the HTTP "Accept:" header. Currently supports YAML and JSON, but is very easily extensible.