web2py.gluon.tools.Crud

Package web2py :: Package gluon :: Module tools :: Class Crud |
[hide private]
[frames] | no frames]

# Class Crud

source code

    object --+
             |
            Crud

Instance Methods | [hide private]
url(self, f=global_settings.applications_parent, args=global_settings.applications_parent, vars=global_settings.applications_parent) this should point to the controller that exposes download and crud | source code
__init__(self, environment, db=global_settings.applications_parent, controller=`'``default``'`) x.__init__(...) initializes x; see x.__class__.__doc__ for signature | source code
__call__(self) | source code
log_event(self, message, vars) | source code
has_permission(self, name, table, record=0) | source code
tables(self) | source code
update(self, table, record, next=<function <lambda> at 0x2fbf7d0>, onvalidation=<function <lambda> at 0x2fbf7d0>, onaccept=<function <lambda> at 0x2fbf7d0>, ondelete=<function <lambda> at 0x2fbf7d0>, log=<function <lambda> at 0x2fbf7d0>, message=<function <lambda> at 0x2fbf7d0>, deletable=<function <lambda> at 0x2fbf7d0>, formname=<function <lambda> at 0x2fbf7d0>) method: Crud.update(table, record, [next=DEFAULT... | source code
create(self, table, next=<function <lambda> at 0x2fbf7d0>, onvalidation=<function <lambda> at 0x2fbf7d0>, onaccept=<function <lambda> at 0x2fbf7d0>, log=<function <lambda> at 0x2fbf7d0>, message=<function <lambda> at 0x2fbf7d0>, formname=<function <lambda> at 0x2fbf7d0>) method: Crud.create(table, [next=DEFAULT [, onvalidation=DEFAULT... | source code
read(self, table, record) | source code
delete(self, table, record_id, next=<function <lambda> at 0x2fbf7d0>, message=<function <lambda> at 0x2fbf7d0>) method: Crud.delete(table, record_id, [next=DEFAULT... | source code
rows(self, table, query=global_settings.applications_parent, fields=global_settings.applications_parent, orderby=global_settings.applications_parent, limitby=global_settings.applications_parent) | source code
select(self, table, query=global_settings.applications_parent, fields=global_settings.applications_parent, orderby=global_settings.applications_parent, limitby=global_settings.applications_parent, headers=global_settings.applications_parent, **attr) | source code
get_format(self, field) | source code
get_query(self, field, op, value, refsearch=True) | source code
search(self, *tables, **args) Creates a search form and its results for a table... | source code
Inherited from `object`: `__delattr__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__str__`

Static Methods | [hide private]
archive(form, archive_table=global_settings.applications_parent, current_record=`'``current_record``'`) | source code

Properties | [hide private]
Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(self, environment, db=global_settings.applications_parent, controller=`'``default``'`) (Constructor) | source code
x.__init__(...) initializes x; see x.__class__.__doc__ for signature Overrides: object.__init__ (inherited documentation)

### update(self, table, record, next=<function <lambda> at 0x2fbf7d0>, onvalidation=<function <lambda> at 0x2fbf7d0>, onaccept=<function <lambda> at 0x2fbf7d0>, ondelete=<function <lambda> at 0x2fbf7d0>, log=<function <lambda> at 0x2fbf7d0>, message=<function <lambda> at 0x2fbf7d0>, deletable=<function <lambda> at 0x2fbf7d0>, formname=<function <lambda> at 0x2fbf7d0>) | source code
    method: Crud.update(table, record, [next=DEFAULT
        [, onvalidation=DEFAULT [, onaccept=DEFAULT [, log=DEFAULT
        [, message=DEFAULT[, deletable=DEFAULT]]]]]])

### create(self, table, next=<function <lambda> at 0x2fbf7d0>, onvalidation=<function <lambda> at 0x2fbf7d0>, onaccept=<function <lambda> at 0x2fbf7d0>, log=<function <lambda> at 0x2fbf7d0>, message=<function <lambda> at 0x2fbf7d0>, formname=<function <lambda> at 0x2fbf7d0>) | source code
    method: Crud.create(table, [next=DEFAULT [, onvalidation=DEFAULT
        [, onaccept=DEFAULT [, log=DEFAULT[, message=DEFAULT]]]]])

### delete(self, table, record_id, next=<function <lambda> at 0x2fbf7d0>, message=<function <lambda> at 0x2fbf7d0>) | source code
    method: Crud.delete(table, record_id, [next=DEFAULT
        [, message=DEFAULT]])

### search(self, *tables, **args) | source code
    Creates a search form and its results for a table
    Example usage:
    form, results = crud.search(db.test,
                           queries = ['equals', 'not equal', 'contains'],
                           query_labels={'equals':'Equals',
                                         'not equal':'Not equal'},
                           fields = ['id','children'],
                           field_labels = {'id':'ID','children':'Children'},
                           zero='Please choose',
                           query = (db.test.id > 0)&(db.test.id != 3) )