|
|
|
|
|
|
|
|
|
|
|
accepts(self,
request_vars,
session=threading.local(),
formname='%(tablename)s/%(record_id)s',
keepvalues=threading.local(),
onvalidation=threading.local(),
dbio=True,
hideerror=True,
detect_record_change=True,
**kwargs)
similar FORM.accepts but also does insert, update or delete in DAL. |
source code
|
|
|
Inherited from html.FORM:
add_button,
hidden_fields,
process,
validate,
xml
Inherited from html.DIV:
__delitem__,
__getitem__,
__len__,
__nonzero__,
__setitem__,
__str__,
append,
element,
elements,
flatten,
insert,
sibling,
siblings,
update
Inherited from html.XmlComponent:
__add__,
__mul__,
add_class,
remove_class
Inherited from object:
__delattr__,
__getattribute__,
__hash__,
__new__,
__reduce__,
__reduce_ex__,
__repr__,
__setattr__
|
|
|
|
|
|
| smartdictform(session,
name,
filename=threading.local(),
query=threading.local(),
**kwargs) |
source code
|
|
|
|
|
|
|
|
|
|
search_menu(fields,
search_options=threading.local(),
prefix='w2p') |
source code
|
|
|
|
grid(query,
fields=threading.local(),
field_id=threading.local(),
left=threading.local(),
headers={},
orderby=threading.local(),
groupby=threading.local(),
searchable=True,
sortable=True,
paginate=20,
deletable=True,
editable=True,
details=True,
selectable=threading.local(),
create=True,
csv=True,
links=threading.local(),
links_in_grid=True,
upload='<default>',
args=[],
user_signature=True,
maxtextlengths={},
maxtextlength=20,
onvalidation=threading.local(),
oncreate=threading.local(),
onupdate=threading.local(),
ondelete=threading.local(),
sorter_icons=(XML('↑'),XML('↓')),
ui='web2py',
showbuttontext=True,
_class='web2py_grid',
formname='web2py_grid',
search_widget='default',
ignore_rw=True,
formstyle='table3cols',
exportclasses=threading.local(),
formargs={},
createargs={},
editargs={},
viewargs={},
buttons_placement='right',
links_placement='right') |
source code
|
|
|
|
smartgrid(table,
constraints=threading.local(),
linked_tables=threading.local(),
links=threading.local(),
links_in_grid=True,
args=threading.local(),
user_signature=True,
divider='>',
breadcrumbs_class='',
**kwargs)
@auth.requires_login()
def index():
db.define_table('person',Field('name'),format='%(name)s')
db.define_table('dog',
Field('name'),Field('owner',db.person),format='%(name)s')
db.define_table('comment',Field('body'),Field('dog',db.dog))
if db(db.person).isempty():
from gluon.contrib.populate import populate
populate(db.person,300)
populate(db.dog,300)
populate(db.comment,1000)
db.commit()
form=SQLFORM.smartgrid(db[request.args(0) or 'person']) #***
return dict(form=form)
*** builds a complete interface to navigate all tables links
to the request.args(0)
table: pagination, search, view, edit, delete,
children, parent, etc. |
source code
|
|
|
Inherited from html.FORM:
confirm
|