mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-03-03 10:45:51 +03:00
Mention deny robots, favicon and login/logout views
This commit is contained in:
parent
eac562b2ec
commit
5ddc941656
|
@ -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'),
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user