diff options
| author | Tom Christie | 2012-09-03 16:42:57 +0100 |
|---|---|---|
| committer | Tom Christie | 2012-09-03 16:42:57 +0100 |
| commit | 1a1ccf94c2c0cadee8b0bd1c8f85c591c650d763 (patch) | |
| tree | 216469f1a58a42f2078a2718f67b4ebcf7dd1128 /djangorestframework/views.py | |
| parent | 93189ec27d53d3216d452abdc2711e973a888d0c (diff) | |
| download | django-rest-framework-1a1ccf94c2c0cadee8b0bd1c8f85c591c650d763.tar.bz2 | |
Fixes to APIView
Diffstat (limited to 'djangorestframework/views.py')
| -rw-r--r-- | djangorestframework/views.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/djangorestframework/views.py b/djangorestframework/views.py index 3b76988c..10b0dccb 100644 --- a/djangorestframework/views.py +++ b/djangorestframework/views.py @@ -12,10 +12,11 @@ from django.utils.html import escape from django.utils.safestring import mark_safe from django.views.decorators.csrf import csrf_exempt -from djangorestframework.compat import View as DjangoView, apply_markdown +from djangorestframework.compat import View, apply_markdown from djangorestframework.response import Response from djangorestframework.request import Request -from djangorestframework import renderers, parsers, authentication, permissions, status, exceptions +from djangorestframework.settings import api_settings +from djangorestframework import parsers, authentication, permissions, status, exceptions __all__ = ( @@ -61,13 +62,13 @@ def _camelcase_to_spaces(content): return re.sub(camelcase_boundry, ' \\1', content).strip() -class View(DjangoView): +class APIView(View): """ Handles incoming requests and maps them to REST operations. Performs request deserialization, response serialization, authentication and input validation. """ - renderers = renderers.DEFAULT_RENDERERS + renderers = api_settings.DEFAULT_RENDERERS """ List of renderer classes the view can serialize the response with, ordered by preference. """ |
