/usr/share/pyshared/tgext/crud/widgets.py is in python-tgext.admin 0.2.6-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | from tw.forms import TextField
try:
import tw.dojo
from sprox.dojo.tablebase import DojoTableBase as TableBase
from sprox.dojo.fillerbase import DojoTableFiller as TableFiller
except ImportError:
from sprox.tablebase import TableBase
from sprox.fillerbase import TableFiller
from sprox.fillerbase import RecordFiller
from sprox.formbase import AddRecordForm, EditableForm
class CrudTable(TableBase):
# __model__ = User
#__limit_fields__ = ['display_name', 'email_address']
__omit_fields__ = ['crud_id', '_password', 'password', 'town_id']
__url__ = '../users.json'
crud_table = UserTable(DBSession)
class CrudTableFiller(TableFiller):
# __model__ = User
# __limit_fields__ = ['crud_id', 'display_name', 'email_address']
__omit_fields__ = ['_password', 'password', 'town_id']
crud_table_filler = UserTableFiller(DBSession)
class CrudEditForm(EditableForm):
# __model__ = User
__require_fields__ = ['crud_name', 'email_address']
__omit_fields__ = ['_password', 'created', 'password']
__hidden_fields__ = ['crud_id']
__field_order__ = ['crud_name', 'email_address', 'display_name', 'groups']
email_address = TextField
display_name = TextField
crud_edit_form = UserEditForm(DBSession)
class CrudNewForm(AddRecordForm):
# __model__ = User
__require_fields__ = ['crud_name', 'email_address']
__omit_fields__ = ['_password', 'created', 'password']
__hidden_fields__ = ['crud_id']
__field_order__ = ['crud_name', 'email_address', 'display_name', 'groups']
email_address = TextField
display_name = TextField
crud_new_form = UserNewForm(DBSession)
class CrudEditFiller(RecordFiller):pass
# __model__ = User
crud_edit_filler = UserEditFiller(DBSession)
|