|
|
|
|
|
|
|
|
|
|
|
accepts(self,
request_vars,
session=global_settings.applications_parent,
formname='%(tablename)s/%(record_id)s',
keepvalues=True,
onvalidation=global_settings.applications_parent,
dbio=True,
hideerror=True,
detect_record_change=True)
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 object:
__delattr__,
__getattribute__,
__hash__,
__new__,
__reduce__,
__reduce_ex__,
__repr__,
__setattr__
|
|
|
|
|
|
| smartdictform(session,
name,
filename=global_settings.applications_parent,
query=global_settings.applications_parent,
**kwargs) |
source code
|
|
|
|
|
|
|
|
|
|
| search_menu(fields,
search_options=global_settings.applications_parent) |
source code
|
|
|
|
grid(query,
fields=global_settings.applications_parent,
field_id=global_settings.applications_parent,
left=global_settings.applications_parent,
headers={},
orderby=global_settings.applications_parent,
searchable=True,
sortable=True,
paginate=20,
deletable=True,
editable=True,
details=True,
selectable=global_settings.applications_parent,
create=True,
csv=True,
links=global_settings.applications_parent,
links_in_grid=True,
upload='<default>',
args=[],
user_signature=True,
maxtextlengths={},
maxtextlength=20,
onvalidation=global_settings.applications_parent,
oncreate=global_settings.applications_parent,
onupdate=global_settings.applications_parent,
ondelete=global_settings.applications_parent,
sorter_icons=(XML('↑'),XML('↓')),
ui='web2py',
showbuttontext=True,
_class='web2py_grid',
formname='web2py_grid',
search_widget='default',
ignore_rw=True,
formstyle='table3cols',
formargs={},
createargs={},
editargs={},
viewargs={}) |
source code
|
|
|
|
smartgrid(table,
constraints=global_settings.applications_parent,
linked_tables=global_settings.applications_parent,
links=global_settings.applications_parent,
links_in_grid=True,
args=global_settings.applications_parent,
user_signature=True,
**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
|
|