From 1cde31c86d9423e9b7a7409c2ef2ba7c0500e47f Mon Sep 17 00:00:00 2001 From: Tom Christie Date: Sat, 25 Feb 2012 18:45:17 +0000 Subject: Massive merge --- docs/howto/setup.rst | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'docs/howto') 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/ -- cgit v1.2.3