aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/howto/setup.rst17
-rw-r--r--docs/index.rst6
-rw-r--r--docs/requirements.txt2
3 files changed, 16 insertions, 9 deletions
diff --git a/docs/howto/setup.rst b/docs/howto/setup.rst
index 0af1449c..f0127060 100644
--- a/docs/howto/setup.rst
+++ b/docs/howto/setup.rst
@@ -53,16 +53,17 @@ YAML support is optional, and requires `PyYAML`_.
Login / Logout
--------------
-Django REST framework includes login and logout views that are useful if
-you're using the self-documenting API::
+Django REST framework includes login and logout views that are needed if
+you're using the self-documenting API.
- from django.conf.urls.defaults import patterns
+Make sure you include the following in your `urlconf`::
- urlpatterns = patterns('djangorestframework.views',
- # Add your resources here
- (r'^accounts/login/$', 'api_login'),
- (r'^accounts/logout/$', 'api_logout'),
- )
+ from django.conf.urls.defaults import patterns, url
+
+ urlpatterns = patterns('',
+ ...
+ url(r'^restframework', include('djangorestframework.urls', namespace='djangorestframework'))
+ )
.. _django.contrib.staticfiles: https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/
.. _django-staticfiles: http://pypi.python.org/pypi/django-staticfiles/
diff --git a/docs/index.rst b/docs/index.rst
index b969c4a3..a6745fca 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -64,6 +64,12 @@ To add Django REST framework to a Django project:
* Ensure that the ``djangorestframework`` directory is on your ``PYTHONPATH``.
* Add ``djangorestframework`` to your ``INSTALLED_APPS``.
+* Add the following to your URLconf. (To include the REST framework Login/Logout views.)::
+
+ urlpatterns = patterns('',
+ ...
+ url(r'^restframework', include('djangorestframework.urls', namespace='djangorestframework'))
+ )
For more information on settings take a look at the :ref:`setup` section.
diff --git a/docs/requirements.txt b/docs/requirements.txt
index 77cdf485..46a67149 100644
--- a/docs/requirements.txt
+++ b/docs/requirements.txt
@@ -1,6 +1,6 @@
# Documentation requires Django & Sphinx, and their dependencies...
-Django==1.2.4
+Django>=1.2.4
Jinja2==2.5.5
Pygments==1.4
Sphinx==1.0.7