diff options
| author | Tom Christie | 2012-12-27 17:53:07 +0000 |
|---|---|---|
| committer | Tom Christie | 2012-12-27 17:53:07 +0000 |
| commit | 4b32cda5a8a32bf43e80dfbe6d9d17a07b20152c (patch) | |
| tree | 976cc8ce53240dd7dc8e402a890e60f8cab9aab9 /README.md | |
| parent | 9cc56a97b55e183d8131665d1409649379a969f0 (diff) | |
| download | django-rest-framework-4b32cda5a8a32bf43e80dfbe6d9d17a07b20152c.tar.bz2 | |
Update release notes and documentation for 2.2.0
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 34 |
1 files changed, 33 insertions, 1 deletions
@@ -39,14 +39,46 @@ There is also a sandbox API you can use for testing purposes, [available here][s # Installation -Install using `pip`... +Install using `pip`, including any optional packages you want... pip install djangorestframework + pip install markdown # Markdown support for the browseable API. + pip install pyyaml # YAML content-type support. + pip install django-filter # Filtering support ...or clone the project from github. git clone git@github.com:tomchristie/django-rest-framework.git + cd django-rest-framework pip install -r requirements.txt + pip install -r optionals.txt + +Add `'rest_framework'` to your `INSTALLED_APPS` setting. + + INSTALLED_APPS = ( + ... + 'rest_framework', + ) + +## Browseable API requirements + +If you're intending to use the browseable API you'll also want to also ensure you include `'django.contrib.staticfiles'` in your `INSTALLED_APPS` setting. + + INSTALLED_APPS = ( + ... + 'django.contrib.staticfiles', + 'rest_framework', + ) + +You'll proabably also want to add REST framework's login and logout views. +Add the following to your root `urls.py` file. + + urlpatterns = patterns('', + ... + url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')) + ) + +Note that the URL path can be whatever you want, but you must include `'rest_framework.urls'` with the `'rest_framework'` namespace. # Development |
