ox-it/django-conneg — pull request #5 by IsoSchiz (2012-09-11 23:27:08+00:00)
Title: Add support for file extension-based content type overriding

Small patch to add support for checking the file extension of the request path and using that as an override (cf. using a request parameter like "format=json").

Support for this behaviour is switched on in the view class using a new class configuration variable "_format_override_extension", so there is no effect on existing users.

We use this to provide cleaner and more proxy-friendly URLs for our APIs: rather than:

http://api.example.com/foo/bar?format=json

this supports:

http://api.example.com/foo/bar.json