diff options
| author | Tom Christie | 2012-08-29 20:57:37 +0100 |
|---|---|---|
| committer | Tom Christie | 2012-08-29 20:57:37 +0100 |
| commit | 578017e01d1da4746ae0045268043cfd74d41b42 (patch) | |
| tree | d729eb93484247fa44b509a4b693811e6978a190 /docs/howto/mixin.rst | |
| parent | 21f59162db37c656b4f025cdd8e13cdb9933a4fc (diff) | |
| download | django-rest-framework-578017e01d1da4746ae0045268043cfd74d41b42.tar.bz2 | |
New docs
Diffstat (limited to 'docs/howto/mixin.rst')
| -rw-r--r-- | docs/howto/mixin.rst | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/docs/howto/mixin.rst b/docs/howto/mixin.rst deleted file mode 100644 index 1a84f2ad..00000000 --- a/docs/howto/mixin.rst +++ /dev/null @@ -1,30 +0,0 @@ -Using Django REST framework Mixin classes -========================================= - -This example demonstrates creating a REST API **without** using Django REST framework's :class:`.Resource` or :class:`.ModelResource`, but instead using Django's :class:`View` class, and adding the :class:`ResponseMixin` class to provide full HTTP Accept header content negotiation, -a browseable Web API, and much of the other goodness that Django REST framework gives you for free. - -.. note:: - - A live sandbox instance of this API is available for testing: - - * http://rest.ep.io/mixin/ - - You can browse the API using a web browser, or from the command line:: - - curl -X GET http://rest.ep.io/mixin/ - - -URL configuration ------------------ - -Everything we need for this example can go straight into the URL conf... - -``urls.py`` - -.. include:: ../../examples/mixin/urls.py - :literal: - -That's it. Auto-magically our API now supports multiple output formats, specified either by using -standard HTTP Accept header content negotiation, or by using the `&_accept=application/json` style parameter overrides. -We even get a nice HTML view which can be used to self-document our API. |
