rattail-demo/rattail_demo/web/views/corepos/members.py
2019-03-06 18:24:00 -06:00

50 lines
1.1 KiB
Python

# -*- coding: utf-8; -*-
"""
CORE-POS member views
"""
from __future__ import unicode_literals, absolute_import
from corepos.db import model as corepos
from .master import CoreMasterView
class MemberTypeView(CoreMasterView):
"""
Master view for member types
"""
model_class = corepos.MemberType
model_title = "CORE-POS Member Type"
url_prefix = '/core-pos/member-types'
route_prefix = 'corepos.member_types'
labels = {
'memtype': "Type",
'memDesc': "Description",
'custdataType': "Cust. Data Type",
'ssi': "SSI",
'salesCode': "Sales Code",
}
def configure_grid(self, g):
super(MemberTypeView, self).configure_grid(g)
g.set_link('memtype')
g.set_link('memDesc')
class MemberView(CoreMasterView):
"""
Master view for members
"""
model_class = corepos.MemberInfo
model_title = "CORE-POS Member"
url_prefix = '/core-pos/members'
route_prefix = 'corepos.members'
def includeme(config):
MemberTypeView.defaults(config)
MemberView.defaults(config)