Convert categories view to master3
This commit is contained in:
parent
34bc59f96f
commit
7dbdaf1f8a
|
@ -28,7 +28,7 @@ from __future__ import unicode_literals, absolute_import
|
|||
|
||||
from rattail.db import model
|
||||
|
||||
from tailbone.views import MasterView2 as MasterView
|
||||
from tailbone.views import MasterView3 as MasterView
|
||||
|
||||
|
||||
class CategoriesView(MasterView):
|
||||
|
@ -47,6 +47,13 @@ class CategoriesView(MasterView):
|
|||
'department',
|
||||
]
|
||||
|
||||
form_fields = [
|
||||
'code',
|
||||
'number',
|
||||
'name',
|
||||
'department',
|
||||
]
|
||||
|
||||
def configure_grid(self, g):
|
||||
super(CategoriesView, self).configure_grid(g)
|
||||
g.filters['name'].default_active = True
|
||||
|
@ -56,16 +63,6 @@ class CategoriesView(MasterView):
|
|||
g.set_link('number')
|
||||
g.set_link('name')
|
||||
|
||||
def configure_fieldset(self, fs):
|
||||
fs.configure(
|
||||
include=[
|
||||
fs.code,
|
||||
fs.number,
|
||||
fs.name,
|
||||
fs.department,
|
||||
])
|
||||
return fs
|
||||
|
||||
|
||||
def includeme(config):
|
||||
CategoriesView.defaults(config)
|
||||
|
|
Loading…
Reference in a new issue