Overhaul the /ordering batch API somewhat; update docs
mostly a savepoint; the /ordering API still needs some work for sure
This commit is contained in:
parent
877e6088e2
commit
6c5cc95e51
6 changed files with 176 additions and 47 deletions
tailbone/api/batch
|
@ -219,6 +219,7 @@ class APIBatchRowView(APIBatchMixin, APIMasterView):
|
|||
"""
|
||||
Base class for all API views which are meant to handle "batch rows" data.
|
||||
"""
|
||||
editable = False
|
||||
supports_quick_entry = False
|
||||
|
||||
def __init__(self, request, **kwargs):
|
||||
|
@ -280,6 +281,8 @@ class APIBatchRowView(APIBatchMixin, APIMasterView):
|
|||
|
||||
resource.add_view(cls.collection_get, permission='{}.view'.format(permission_prefix))
|
||||
resource.add_view(cls.get, permission='{}.view'.format(permission_prefix))
|
||||
if cls.editable:
|
||||
resource.add_view(cls.post, permission='{}.edit'.format(permission_prefix))
|
||||
rows_resource = resource.add_resource(cls, collection_path=collection_url_prefix,
|
||||
path='{}/{{uuid}}'.format(object_url_prefix))
|
||||
config.add_cornice_resource(rows_resource)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue