mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-25 19:14:01 +03:00
Docs update
This commit is contained in:
parent
29bc52096a
commit
41ab18b13e
26
README.md
26
README.md
|
@ -6,11 +6,23 @@
|
||||||
|
|
||||||
[![build-status-image]][travis]
|
[![build-status-image]][travis]
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Full documentation for REST framework is available on [http://django-rest-framework.org][docs].**
|
||||||
|
|
||||||
|
Note that this is the 2.0 version of REST framework. If you are looking for earlier versions please see the [0.4.x branch][0.4] on GitHub.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
# Overview
|
# Overview
|
||||||
|
|
||||||
This branch is the redesign of Django REST framework. It is a work in progress.
|
Django REST framework is a lightweight library that makes it easy to build Web APIs. It is designed as a modular and easy to customize architecture, based on Django's class based views.
|
||||||
|
|
||||||
For more information, check out [the documentation][docs], in particular, the tutorial is recommended as the best place to get an overview of the redesign.
|
Web APIs built using REST framework are fully self-describing and web browseable - a huge useability win for your developers. It also supports a wide range of media types, authentication and permission policies out of the box.
|
||||||
|
|
||||||
|
If you are considering using REST framework for your API, we recommend reading the [REST framework 2 announcment][rest-framework-2-announcement] which gives a good overview of the framework and it's capabilities.
|
||||||
|
|
||||||
|
There is also a sandbox API you can use for testing purposes, [available here][sandbox].
|
||||||
|
|
||||||
# Requirements
|
# Requirements
|
||||||
|
|
||||||
|
@ -24,8 +36,6 @@ For more information, check out [the documentation][docs], in particular, the tu
|
||||||
|
|
||||||
# Installation
|
# Installation
|
||||||
|
|
||||||
**Leaving these instructions in for the moment, they'll be valid once this becomes the master version**
|
|
||||||
|
|
||||||
Install using `pip`...
|
Install using `pip`...
|
||||||
|
|
||||||
pip install djangorestframework
|
pip install djangorestframework
|
||||||
|
@ -35,10 +45,6 @@ Install using `pip`...
|
||||||
git clone git@github.com:tomchristie/django-rest-framework.git
|
git clone git@github.com:tomchristie/django-rest-framework.git
|
||||||
pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
|
|
||||||
# Quickstart
|
|
||||||
|
|
||||||
**TODO**
|
|
||||||
|
|
||||||
# Development
|
# Development
|
||||||
|
|
||||||
To build the docs.
|
To build the docs.
|
||||||
|
@ -84,6 +90,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
[build-status-image]: https://secure.travis-ci.org/tomchristie/django-rest-framework.png?branch=restframework2
|
[build-status-image]: https://secure.travis-ci.org/tomchristie/django-rest-framework.png?branch=restframework2
|
||||||
[travis]: http://travis-ci.org/tomchristie/django-rest-framework?branch=restframework2
|
[travis]: http://travis-ci.org/tomchristie/django-rest-framework?branch=restframework2
|
||||||
[twitter]: https://twitter.com/_tomchristie
|
[twitter]: https://twitter.com/_tomchristie
|
||||||
|
[0.4]: https://github.com/tomchristie/django-rest-framework/tree/0.4.X
|
||||||
|
[sandbox]: http://restframework.herokuapp.com/
|
||||||
|
[rest-framework-2-announcement]: topics/rest-framework-2-announcement.md
|
||||||
|
|
||||||
[docs]: http://tomchristie.github.com/django-rest-framework/
|
[docs]: http://tomchristie.github.com/django-rest-framework/
|
||||||
[urlobject]: https://github.com/zacharyvoase/urlobject
|
[urlobject]: https://github.com/zacharyvoase/urlobject
|
||||||
[markdown]: http://pypi.python.org/pypi/Markdown/
|
[markdown]: http://pypi.python.org/pypi/Markdown/
|
||||||
|
|
|
@ -5,12 +5,24 @@
|
||||||
|
|
||||||
**A toolkit for building well-connected, self-describing Web APIs.**
|
**A toolkit for building well-connected, self-describing Web APIs.**
|
||||||
|
|
||||||
**WARNING: This documentation is for the 2.0 redesign of REST framework. It is a work in progress.**
|
---
|
||||||
|
|
||||||
|
**Note**: This documentation is for the 2.0 version of REST framework. If you are looking for earlier versions please see the [0.4.x branch][0.4] on GitHub.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
Django REST framework is a lightweight library that makes it easy to build Web APIs. It is designed as a modular and easy to customize architecture, based on Django's class based views.
|
Django REST framework is a lightweight library that makes it easy to build Web APIs. It is designed as a modular and easy to customize architecture, based on Django's class based views.
|
||||||
|
|
||||||
Web APIs built using REST framework are fully self-describing and web browseable - a huge useability win for your developers. It also supports a wide range of media types, authentication and permission policies out of the box.
|
Web APIs built using REST framework are fully self-describing and web browseable - a huge useability win for your developers. It also supports a wide range of media types, authentication and permission policies out of the box.
|
||||||
|
|
||||||
|
If you are considering using REST framework for your API, we recommend reading the [REST framework 2 announcment][rest-framework-2-announcement] which gives a good overview of the framework and it's capabilities.
|
||||||
|
|
||||||
|
There is also a sandbox API you can use for testing purposes, [available here][sandbox].
|
||||||
|
|
||||||
|
**Below**: *Screenshot from the browseable API*
|
||||||
|
|
||||||
|
![Screenshot][image]
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
REST framework requires the following:
|
REST framework requires the following:
|
||||||
|
@ -25,8 +37,6 @@ The following packages are optional:
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
**WARNING: These instructions will only become valid once this becomes the master version**
|
|
||||||
|
|
||||||
Install using `pip`, including any optional packages you want...
|
Install using `pip`, including any optional packages you want...
|
||||||
|
|
||||||
pip install djangorestframework
|
pip install djangorestframework
|
||||||
|
@ -152,6 +162,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
[urlobject]: https://github.com/zacharyvoase/urlobject
|
[urlobject]: https://github.com/zacharyvoase/urlobject
|
||||||
[markdown]: http://pypi.python.org/pypi/Markdown/
|
[markdown]: http://pypi.python.org/pypi/Markdown/
|
||||||
[yaml]: http://pypi.python.org/pypi/PyYAML
|
[yaml]: http://pypi.python.org/pypi/PyYAML
|
||||||
|
[0.4]: https://github.com/tomchristie/django-rest-framework/tree/0.4.X
|
||||||
|
[image]: img/quickstart.png
|
||||||
|
[sandbox]: http://restframework.herokuapp.com/
|
||||||
|
|
||||||
[quickstart]: tutorial/quickstart.md
|
[quickstart]: tutorial/quickstart.md
|
||||||
[tut-1]: tutorial/1-serialization.md
|
[tut-1]: tutorial/1-serialization.md
|
||||||
|
|
|
@ -6,7 +6,13 @@ What it is, and why you should care
|
||||||
>
|
>
|
||||||
> — [Roy Fielding][cite]
|
> — [Roy Fielding][cite]
|
||||||
|
|
||||||
REST framework 2 is an almost complete reworking of the original framework, which comprehensivly addresses some of the original design issues.
|
---
|
||||||
|
|
||||||
|
**Announcement:** REST framework 2 released - Tue 30th Oct 2012
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
REST framework 2 is an almost complete reworking of the original framework, which comprehensively addresses some of the original design issues.
|
||||||
|
|
||||||
Because the latest version should be considered a re-release, rather than an incremental improvement, we've skipped a version, and called this release Django REST framework 2.0.
|
Because the latest version should be considered a re-release, rather than an incremental improvement, we've skipped a version, and called this release Django REST framework 2.0.
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,12 @@ This tutorial will cover creating a simple pastebin code highlighting Web API. A
|
||||||
|
|
||||||
The tutorial is fairly in-depth, so you should probably get a cookie and a cup of your favorite brew before getting started. If you just want a quick overview, you should head over to the [quickstart] documentation instead.
|
The tutorial is fairly in-depth, so you should probably get a cookie and a cup of your favorite brew before getting started. If you just want a quick overview, you should head over to the [quickstart] documentation instead.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Note**: The final code for this tutorial is available in the [tomchristie/rest-framework-tutorial][repo] repository on GitHub. There is also a sandbox version for testing, [available here][sandbox].
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## Setting up a new environment
|
## Setting up a new environment
|
||||||
|
|
||||||
Before we do anything else we'll create a new virtual environment, using [virtualenv]. This will make sure our package configuration is keep nicely isolated from any other projects we're working on.
|
Before we do anything else we'll create a new virtual environment, using [virtualenv]. This will make sure our package configuration is keep nicely isolated from any other projects we're working on.
|
||||||
|
@ -303,5 +309,7 @@ Our API views don't do anything particularly special at the moment, beyond serve
|
||||||
We'll see how we can start to improve things in [part 2 of the tutorial][tut-2].
|
We'll see how we can start to improve things in [part 2 of the tutorial][tut-2].
|
||||||
|
|
||||||
[quickstart]: quickstart.md
|
[quickstart]: quickstart.md
|
||||||
|
[repo]: https://github.com/tomchristie/rest-framework-tutorial
|
||||||
|
[sandbox]: http://restframework.herokuapp.com/
|
||||||
[virtualenv]: http://www.virtualenv.org/en/latest/index.html
|
[virtualenv]: http://www.virtualenv.org/en/latest/index.html
|
||||||
[tut-2]: 2-requests-and-responses.md
|
[tut-2]: 2-requests-and-responses.md
|
||||||
|
|
|
@ -167,7 +167,7 @@ We've reached the end of our tutorial. If you want to get more involved in the
|
||||||
**Now go build some awesome things.**
|
**Now go build some awesome things.**
|
||||||
|
|
||||||
[repo]: https://github.com/tomchristie/rest-framework-tutorial
|
[repo]: https://github.com/tomchristie/rest-framework-tutorial
|
||||||
[sandbox]: http://sultry-coast-6726.herokuapp.com/
|
[sandbox]: http://restframework.herokuapp.com/
|
||||||
[github]: https://github.com/tomchristie/django-rest-framework
|
[github]: https://github.com/tomchristie/django-rest-framework
|
||||||
[group]: https://groups.google.com/forum/?fromgroups#!forum/django-rest-framework
|
[group]: https://groups.google.com/forum/?fromgroups#!forum/django-rest-framework
|
||||||
[twitter]: https://twitter.com/_tomchristie
|
[twitter]: https://twitter.com/_tomchristie
|
Loading…
Reference in New Issue
Block a user