Add new "master" API view class; refactor products and batches to use it

This commit is contained in:
Lance Edgar 2020-03-01 16:45:24 -06:00
parent df00dd600a
commit 113c0af49d
8 changed files with 183 additions and 90 deletions

View file

@ -2,7 +2,7 @@
################################################################################
#
# Rattail -- Retail Software Framework
# Copyright © 2010-2019 Lance Edgar
# Copyright © 2010-2020 Lance Edgar
#
# This file is part of Rattail.
#
@ -43,15 +43,6 @@ class LabelBatchViews(APIBatchView):
object_url_prefix = '/label-batch'
supports_toggle_complete = True
def collection_get(self):
return self._collection_get()
def collection_post(self):
return self._collection_post()
def get(self):
return self._get()
class LabelBatchRowViews(APIBatchRowView):
@ -74,12 +65,6 @@ class LabelBatchRowViews(APIBatchRowView):
data['full_description'] = row.product.full_description if row.product else row.description
return data
def collection_get(self):
return self._collection_get()
def get(self):
return self._get()
def includeme(config):
LabelBatchViews.defaults(config)