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
tailbone/views/labels
|
@ -2,7 +2,7 @@
|
|||
################################################################################
|
||||
#
|
||||
# Rattail -- Retail Software Framework
|
||||
# Copyright © 2010-2019 Lance Edgar
|
||||
# Copyright © 2010-2021 Lance Edgar
|
||||
#
|
||||
# This file is part of Rattail.
|
||||
#
|
||||
|
@ -34,7 +34,7 @@ from tailbone import forms
|
|||
from tailbone.views import MasterView
|
||||
|
||||
|
||||
class ProfilesView(MasterView):
|
||||
class LabelProfileView(MasterView):
|
||||
"""
|
||||
Master view for the LabelProfile model.
|
||||
"""
|
||||
|
@ -63,14 +63,14 @@ class ProfilesView(MasterView):
|
|||
]
|
||||
|
||||
def configure_grid(self, g):
|
||||
super(ProfilesView, self).configure_grid(g)
|
||||
super(LabelProfileView, self).configure_grid(g)
|
||||
g.set_sort_defaults('ordinal')
|
||||
g.set_type('visible', 'boolean')
|
||||
g.set_link('code')
|
||||
g.set_link('description')
|
||||
|
||||
def configure_form(self, f):
|
||||
super(ProfilesView, self).configure_form(f)
|
||||
super(LabelProfileView, self).configure_form(f)
|
||||
|
||||
# format
|
||||
f.set_type('format', 'codeblock')
|
||||
|
@ -167,6 +167,9 @@ class ProfilesView(MasterView):
|
|||
config.add_view(cls, attr='printer_settings', route_name='{}.printer_settings'.format(route_prefix),
|
||||
permission='{}.edit'.format(permission_prefix))
|
||||
|
||||
# TODO: deprecate / remove this
|
||||
ProfilesView = LabelProfileView
|
||||
|
||||
|
||||
def includeme(config):
|
||||
ProfilesView.defaults(config)
|
||||
LabelProfileView.defaults(config)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue