diff options
| author | Tom Christie | 2011-05-23 17:09:29 +0100 |
|---|---|---|
| committer | Tom Christie | 2011-05-23 17:09:29 +0100 |
| commit | 698df527a3b80edbf4278ea52e88c1699b2f2256 (patch) | |
| tree | 467355534b496ab29c7960133d2057b27fdc13ea /djangorestframework/views.py | |
| parent | c53175914752502629141556f3e001e9d2e9f7fa (diff) | |
| parent | 82c4ca96126cfedd4a8471452d956e8bb432ba5b (diff) | |
| download | django-rest-framework-698df527a3b80edbf4278ea52e88c1699b2f2256.tar.bz2 | |
check in marko's docs
Diffstat (limited to 'djangorestframework/views.py')
| -rw-r--r-- | djangorestframework/views.py | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/djangorestframework/views.py b/djangorestframework/views.py index a0471166..545671a4 100644 --- a/djangorestframework/views.py +++ b/djangorestframework/views.py @@ -1,3 +1,10 @@ +""" +The :mod:`views` module provides the Views you will most probably +be subclassing in your implementation. + +By setting or modifying class attributes on your view, you change it's predefined behaviour. +""" + from django.core.urlresolvers import set_script_prefix from django.views.decorators.csrf import csrf_exempt @@ -26,25 +33,25 @@ class BaseView(ResourceMixin, RequestMixin, ResponseMixin, AuthMixin, View): # Use the base resource by default resource = resources.Resource - # List of renderers the resource can serialize the response with, ordered by preference. renderers = ( renderers.JSONRenderer, renderers.DocumentingHTMLRenderer, renderers.DocumentingXHTMLRenderer, renderers.DocumentingPlainTextRenderer, renderers.XMLRenderer ) - - # List of parsers the resource can parse the request with. + """ List of renderers the resource can serialize the response with, ordered by preference.""" + parsers = ( parsers.JSONParser, parsers.FormParser, parsers.MultiPartParser ) + """ List of parsers the resource can parse the request with.""" - # List of all authenticating methods to attempt. authentication = ( authentication.UserLoggedInAuthenticaton, authentication.BasicAuthenticaton ) + """ List of all authenticating methods to attempt.""" - # List of all permissions that must be checked. permissions = ( permissions.FullAnonAccess, ) - + """ List of all permissions that must be checked.""" + # Allow name and description for the Resource to be set explicitly, # overiding the default classname/docstring behaviour. # These are used for documentation in the standard html and text renderers. |
