diff options
| author | Tom Christie | 2012-02-21 22:50:41 +0000 |
|---|---|---|
| committer | Tom Christie | 2012-02-21 22:50:41 +0000 |
| commit | 66eabe8bd1a539f92c3d677565d69edc29a1721b (patch) | |
| tree | 60c5d2f5cdba605e73545ae21d94fcf809a39788 /docs/howto/setup.rst | |
| parent | b074754b54adf172cd2d102e2a326a7f322cf2ef (diff) | |
| download | django-rest-framework-66eabe8bd1a539f92c3d677565d69edc29a1721b.tar.bz2 | |
Remove staticviews. Use standard login/logout
Diffstat (limited to 'docs/howto/setup.rst')
| -rw-r--r-- | docs/howto/setup.rst | 17 |
1 files changed, 9 insertions, 8 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/ |
