aboutsummaryrefslogtreecommitdiffstats
path: root/docs/howto
diff options
context:
space:
mode:
authorTom Christie2012-02-25 18:45:17 +0000
committerTom Christie2012-02-25 18:45:17 +0000
commit1cde31c86d9423e9b7a7409c2ef2ba7c0500e47f (patch)
treeea24bce0f24507aa43f408776ccf7324f204256d /docs/howto
parent5fd4c639d7c64572dd07dc31dcd627bed9469b05 (diff)
downloaddjango-rest-framework-1cde31c86d9423e9b7a7409c2ef2ba7c0500e47f.tar.bz2
Massive merge
Diffstat (limited to 'docs/howto')
-rw-r--r--docs/howto/setup.rst18
1 files changed, 9 insertions, 9 deletions
diff --git a/docs/howto/setup.rst b/docs/howto/setup.rst
index 0af1449c..081c6412 100644
--- a/docs/howto/setup.rst
+++ b/docs/howto/setup.rst
@@ -49,20 +49,20 @@ YAML
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.
+
+Make sure you include the following in your `urlconf`::
- from django.conf.urls.defaults import patterns
+ from django.conf.urls.defaults import patterns, url
- urlpatterns = patterns('djangorestframework.views',
- # Add your resources here
- (r'^accounts/login/$', 'api_login'),
- (r'^accounts/logout/$', 'api_logout'),
- )
+ 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/