From e0b82ce76de261c8f530cb488afb390c4aec13a8 Mon Sep 17 00:00:00 2001 From: Marko Tibold Date: Mon, 2 Jan 2012 21:16:44 +0100 Subject: [PATCH] minor style edits --- docs/howto/mixin.rst | 6 +++--- docs/howto/setup.rst | 12 ++++++++---- docs/howto/usingurllib2.rst | 4 ++-- docs/index.rst | 1 + 4 files changed, 14 insertions(+), 9 deletions(-) diff --git a/docs/howto/mixin.rst b/docs/howto/mixin.rst index d8b1c4f03..1a84f2ad4 100644 --- a/docs/howto/mixin.rst +++ b/docs/howto/mixin.rst @@ -1,8 +1,7 @@ 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 :class:`View` class, and adding the :class:`EmitterMixin` class to provide full HTTP Accept header content negotiation, +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:: @@ -26,5 +25,6 @@ Everything we need for this example can go straight into the URL conf... .. 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. +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. diff --git a/docs/howto/setup.rst b/docs/howto/setup.rst index a9053f733..f14e04999 100644 --- a/docs/howto/setup.rst +++ b/docs/howto/setup.rst @@ -13,7 +13,7 @@ If you need to manually install Django REST framework to your ``site-packages`` Template Loaders ---------------- -Django REST framework uses a few templates for the HTML and plain text documenting emitters. +Django REST framework uses a few templates for the HTML and plain text documenting renderers. * Ensure ``TEMPLATE_LOADERS`` setting contains ``'django.template.loaders.app_directories.Loader'``. @@ -22,16 +22,20 @@ This will be the case by default so you shouldn't normally need to do anything h Admin Styling ------------- -Django REST framework uses the admin media for styling. When running using Django's testserver this is automatically served for you, but once you move onto a production server, you'll want to make sure you serve the admin media separately, exactly as you would do `if using the Django admin `_. +Django REST framework uses the admin media for styling. When running using Django's testserver this is automatically served for you, +but once you move onto a production server, you'll want to make sure you serve the admin media separately, exactly as you would do +`if using the Django admin `_. -* Ensure that the ``ADMIN_MEDIA_PREFIX`` is set appropriately and that you are serving the admin media. (Django's testserver will automatically serve the admin media for you) +* Ensure that the ``ADMIN_MEDIA_PREFIX`` is set appropriately and that you are serving the admin media. + (Django's testserver will automatically serve the admin media for you) Markdown -------- The Python `markdown library `_ is not required but comes recommended. -If markdown is installed your :class:`.Resource` descriptions can include `markdown style formatting `_ which will be rendered by the HTML documenting emitter. +If markdown is installed your :class:`.Resource` descriptions can include `markdown style formatting +`_ which will be rendered by the HTML documenting renderer. robots.txt, favicon, login/logout --------------------------------- diff --git a/docs/howto/usingurllib2.rst b/docs/howto/usingurllib2.rst index 139bf7173..6320dc208 100644 --- a/docs/howto/usingurllib2.rst +++ b/docs/howto/usingurllib2.rst @@ -1,5 +1,5 @@ -Using urllib2 -============= +Using urllib2 with Django REST Framework +======================================== Python's standard library comes with some nice modules you can use to test your api or even write a full client. diff --git a/docs/index.rst b/docs/index.rst index 3311bfa99..c8a58f1f7 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -14,6 +14,7 @@ Django REST framework is a lightweight REST framework for Django, that aims to m **Browse example APIs created with Django REST framework:** `The Sandbox `_ Features: +--------- * Automatically provides an awesome Django admin style `browse-able self-documenting API `_. * Clean, simple, views for Resources, using Django's new `class based views `_.