mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-13 13:16:55 +03:00
Reverted formatting
This commit is contained in:
parent
7fa3a214fb
commit
049d417ebc
|
@ -225,7 +225,6 @@ class DocumentingTemplateRenderer(BaseRenderer):
|
|||
|
||||
return content
|
||||
|
||||
|
||||
def _get_form_instance(self, view, method):
|
||||
"""
|
||||
Get a form, possibly bound to either the input or output data.
|
||||
|
@ -261,7 +260,6 @@ class DocumentingTemplateRenderer(BaseRenderer):
|
|||
|
||||
return form_instance
|
||||
|
||||
|
||||
def _get_generic_content_form(self, view):
|
||||
"""
|
||||
Returns a form that allows for arbitrary content types to be tunneled via standard HTML forms
|
||||
|
@ -402,12 +400,14 @@ class DocumentingPlainTextRenderer(DocumentingTemplateRenderer):
|
|||
template = 'renderer.txt'
|
||||
|
||||
|
||||
DEFAULT_RENDERERS = ( JSONRenderer,
|
||||
DEFAULT_RENDERERS = (
|
||||
JSONRenderer,
|
||||
JSONPRenderer,
|
||||
DocumentingHTMLRenderer,
|
||||
DocumentingXHTMLRenderer,
|
||||
DocumentingPlainTextRenderer,
|
||||
XMLRenderer )
|
||||
XMLRenderer
|
||||
)
|
||||
|
||||
if YAMLRenderer:
|
||||
DEFAULT_RENDERERS += (YAMLRenderer,)
|
||||
|
|
|
@ -11,8 +11,13 @@
|
|||
/* Custom styles */
|
||||
.version{font-size:8px;}
|
||||
</style>
|
||||
{% if ADMIN_MEDIA_PREFIX %}
|
||||
<link rel="stylesheet" type="text/css" href='{{ADMIN_MEDIA_PREFIX}}css/base.css'/>
|
||||
<link rel="stylesheet" type="text/css" href='{{ADMIN_MEDIA_PREFIX}}css/forms.css'/>
|
||||
{% else %}
|
||||
<link rel="stylesheet" type="text/css" href='{{STATIC_URL}}admin/css/base.css'/>
|
||||
<link rel="stylesheet" type="text/css" href='{{STATIC_URL}}admin/css/forms.css'/>
|
||||
{% endif %}
|
||||
<title>Django REST framework - {{ name }}</title>
|
||||
</head>
|
||||
<body>
|
||||
|
|
|
@ -27,7 +27,6 @@ __all__ = (
|
|||
)
|
||||
|
||||
|
||||
|
||||
class View(ResourceMixin, RequestMixin, ResponseMixin, AuthMixin, DjangoView):
|
||||
"""
|
||||
Handles incoming requests and maps them to REST operations.
|
||||
|
@ -240,18 +239,21 @@ class ModelView(View):
|
|||
"""
|
||||
resource = resources.ModelResource
|
||||
|
||||
|
||||
class InstanceModelView(InstanceMixin, ReadModelMixin, UpdateModelMixin, DeleteModelMixin, ModelView):
|
||||
"""
|
||||
A view which provides default operations for read/update/delete against a model instance.
|
||||
"""
|
||||
_suffix = 'Instance'
|
||||
|
||||
|
||||
class ListModelView(ListModelMixin, ModelView):
|
||||
"""
|
||||
A view which provides default operations for list, against a model in the database.
|
||||
"""
|
||||
_suffix = 'List'
|
||||
|
||||
|
||||
class ListOrCreateModelView(ListModelMixin, CreateModelMixin, ModelView):
|
||||
"""
|
||||
A view which provides default operations for list and create, against a model in the database.
|
||||
|
|
Loading…
Reference in New Issue
Block a user