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

Class Crud

source code

object --+
         |
        Crud

Instance Methods [hide private]
 
url(self, f=None, args=None, vars=None)
this should point to the controller that exposes download and crud
source code
 
__init__(self, environment, db=None, controller='default')
x.__init__(...) initializes x; see help(type(x)) 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 0x552ba28>, onvalidation=<function <lambda> at 0x552ba28>, onaccept=<function <lambda> at 0x552ba28>, ondelete=<function <lambda> at 0x552ba28>, log=<function <lambda> at 0x552ba28>, message=<function <lambda> at 0x552ba28>, deletable=<function <lambda> at 0x552ba28>, formname=<function <lambda> at 0x552ba28>, **attributes)
method: Crud.update(table, record, [next=DEFAULT...
source code
 
create(self, table, next=<function <lambda> at 0x552ba28>, onvalidation=<function <lambda> at 0x552ba28>, onaccept=<function <lambda> at 0x552ba28>, log=<function <lambda> at 0x552ba28>, message=<function <lambda> at 0x552ba28>, formname=<function <lambda> at 0x552ba28>, **attributes)
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 0x552ba28>, message=<function <lambda> at 0x552ba28>)
method: Crud.delete(table, record_id, [next=DEFAULT...
source code
 
rows(self, table, query=None, fields=None, orderby=None, limitby=None) source code
 
select(self, table, query=None, fields=None, orderby=None, limitby=None, headers=None, **attr) source code
 
get_format(self, field) source code
 
get_query(self, field, op, value, refsearch=False) source code
 
search(self, *tables, **args)
Creates a search form and its results for a table...
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Static Methods [hide private]
 
archive(form, archive_table=None, current_record='current_record') source code
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, environment, db=None, controller='default')
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

update(self, table, record, next=<function <lambda> at 0x552ba28>, onvalidation=<function <lambda> at 0x552ba28>, onaccept=<function <lambda> at 0x552ba28>, ondelete=<function <lambda> at 0x552ba28>, log=<function <lambda> at 0x552ba28>, message=<function <lambda> at 0x552ba28>, deletable=<function <lambda> at 0x552ba28>, formname=<function <lambda> at 0x552ba28>, **attributes)

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 0x552ba28>, onvalidation=<function <lambda> at 0x552ba28>, onaccept=<function <lambda> at 0x552ba28>, log=<function <lambda> at 0x552ba28>, message=<function <lambda> at 0x552ba28>, formname=<function <lambda> at 0x552ba28>, **attributes)

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 0x552ba28>, message=<function <lambda> at 0x552ba28>)

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) )