aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortom christie tom@tomchristie.com2011-02-19 13:28:21 +0000
committertom christie tom@tomchristie.com2011-02-19 13:28:21 +0000
commit5ddc941656f688a1a0deafbb8f1f075aa9b7cb98 (patch)
treee45ead9ae61252f743d87161e623f43b46187495
parenteac562b2ec04739f0ea62bfa9dabaefd00fdf582 (diff)
downloaddjango-rest-framework-5ddc941656f688a1a0deafbb8f1f075aa9b7cb98.tar.bz2
Mention deny robots, favicon and login/logout views
-rw-r--r--docs/howto/setup.rst15
1 files changed, 15 insertions, 0 deletions
diff --git a/docs/howto/setup.rst b/docs/howto/setup.rst
index 97b9e6d4..bf97007b 100644
--- a/docs/howto/setup.rst
+++ b/docs/howto/setup.rst
@@ -26,3 +26,18 @@ The Python `markdown library <http://www.freewisdom.org/projects/python-markdown
If markdown is installed your :class:`.Resource` descriptions can include `markdown style formatting <http://daringfireball.net/projects/markdown/syntax>`_ which will be rendered by the HTML documenting emitter.
+robots.txt, favicon, login/logout
+---------------------------------
+
+Django REST framework comes with a few views that can be useful including a deny robots view, a favicon view, and api login and logout views::
+
+ from django.conf.urls.defaults import patterns
+
+ urlpatterns = patterns('djangorestframework.views',
+ (r'robots.txt', 'deny_robots'),
+ (r'favicon.ico', 'favicon'),
+ # Add your resources here
+ (r'^accounts/login/$', 'api_login'),
+ (r'^accounts/logout/$', 'api_logout'),
+ )
+