Normalize naming of all traditional master views
such names should never use plural forms. for now what plural forms were previously in use, should still work. ideally can remove those at some point
This commit is contained in:
parent
3ad19d05e5
commit
719e7c8441
30 changed files with 273 additions and 177 deletions
15
tailbone/views/vendors/core.py
vendored
15
tailbone/views/vendors/core.py
vendored
|
@ -2,7 +2,7 @@
|
|||
################################################################################
|
||||
#
|
||||
# Rattail -- Retail Software Framework
|
||||
# Copyright © 2010-2018 Lance Edgar
|
||||
# Copyright © 2010-2021 Lance Edgar
|
||||
#
|
||||
# This file is part of Rattail.
|
||||
#
|
||||
|
@ -35,7 +35,7 @@ from webhelpers2.html import tags
|
|||
from tailbone.views import MasterView, AutocompleteView
|
||||
|
||||
|
||||
class VendorsView(MasterView):
|
||||
class VendorView(MasterView):
|
||||
"""
|
||||
Master view for the Vendor class.
|
||||
"""
|
||||
|
@ -72,7 +72,7 @@ class VendorsView(MasterView):
|
|||
]
|
||||
|
||||
def configure_grid(self, g):
|
||||
super(VendorsView, self).configure_grid(g)
|
||||
super(VendorView, self).configure_grid(g)
|
||||
|
||||
g.filters['name'].default_active = True
|
||||
g.filters['name'].default_verb = 'contains'
|
||||
|
@ -86,7 +86,7 @@ class VendorsView(MasterView):
|
|||
g.set_link('abbreviation')
|
||||
|
||||
def configure_form(self, f):
|
||||
super(VendorsView, self).configure_form(f)
|
||||
super(VendorView, self).configure_form(f)
|
||||
vendor = f.model_instance
|
||||
|
||||
# default_phone
|
||||
|
@ -114,7 +114,7 @@ class VendorsView(MasterView):
|
|||
def objectify(self, form, data=None):
|
||||
if data is None:
|
||||
data = form.validated
|
||||
vendor = super(VendorsView, self).objectify(form, data)
|
||||
vendor = super(VendorView, self).objectify(form, data)
|
||||
vendor = self.objectify_contact(vendor, data)
|
||||
|
||||
if 'orders_email' in data:
|
||||
|
@ -164,6 +164,9 @@ class VendorsView(MasterView):
|
|||
(model.VendorContact, 'vendor_uuid'),
|
||||
]
|
||||
|
||||
# TODO: deprecate / remove this
|
||||
VendorsView = VendorView
|
||||
|
||||
|
||||
class VendorsAutocomplete(AutocompleteView):
|
||||
|
||||
|
@ -178,4 +181,4 @@ def includeme(config):
|
|||
config.add_view(VendorsAutocomplete, route_name='vendors.autocomplete',
|
||||
renderer='json', permission='vendors.list')
|
||||
|
||||
VendorsView.defaults(config)
|
||||
VendorView.defaults(config)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue