Allow CRUD actions by default, for CORE master views

This commit is contained in:
Lance Edgar 2019-10-25 15:35:43 -05:00
parent 6dc246258a
commit e36c413efb

View file

@ -24,18 +24,11 @@
CORE POS master view
"""
# import six
# from corepos.util import catapult_time
# from rattail.time import localtime
# from rattail.util import NOTSET
from rattail.util import OrderedDict
from webhelpers2.html import HTML, tags
from webhelpers2.html import tags
from tailbone.views import MasterView
# from tailbone.util import raw_datetime
from tailbone_corepos.db import CoreOfficeSession, ExtraCoreOfficeSessions
@ -43,30 +36,9 @@ class CoreOfficeMasterView(MasterView):
"""
Master base class for Catapult views
"""
# model_key = 'pk'
creatable = False
editable = False
deletable = False
supports_multiple_engines = True
engine_type_key = 'corepos'
# # TODO: would be nice to find a way around this somehow
# # must encode all search values as utf-8
# use_byte_string_filters = True
# def get_action_route_kwargs(self, row):
# return {'pk': six.text_type(row.pk)}
# def render_catapult_datetime(self, record, field, value=NOTSET):
# if value is NOTSET:
# value = getattr(record, field)
# if not value:
# return ""
# value = catapult_time(value)
# value = localtime(self.rattail_config, value)
# return raw_datetime(self.rattail_config, value)
def get_db_engines(self):
engines = OrderedDict()
if self.rattail_config.corepos_engine: