Docs for FORM.process
Description
<type 'instancemethod'>
|
Attributes
FORM.process.__call__ |
<type 'method-wrapper'>
belongs to class <type 'method-wrapper'>
x.__call__(...) <==> x(...) |
FORM.process.__class__ |
<type 'type'> extends (<type 'object'>,)
belongs to class <type 'type'>
instancemethod(function, instance, class) Create an instance method object. |
FORM.process.__cmp__ |
<type 'method-wrapper'>
belongs to class <type 'method-wrapper'>
x.__cmp__(y) <==> cmp(x,y) |
FORM.process.__delattr__ |
<type 'method-wrapper'>
belongs to class <type 'method-wrapper'>
x.__delattr__('name') <==> del x.name |
FORM.process.__doc__ |
<type 'str'>
belongs to class <type 'str'>
str(object='') -> string Return a nice string representation of the object. If the argument is a string, the return value is the same object. |
FORM.process.__format__ |
<type 'builtin_function_or_method'>
belongs to class <type 'builtin_function_or_method'>
default object formatter |
FORM.process.__func__ |
<type 'function'>
belongs to class <type 'function'>
Perform the .validate() method but returns the form Usage in controllers:: # directly on return def action(): #some code here return dict(form=FORM(...).process(...)) You can use it with FORM, SQLFORM or FORM based plugins:: # response.flash messages def action(): form = SQLFORM(db.table).process(message_onsuccess='Sucess!') return dict(form=form) # callback function # callback receives True or False as first arg, and a list of args. def my_callback(status, msg): response.flash = "Success! "+msg if status else "Errors occured" # after argument can be 'flash' to response.flash messages # or a function name to use as callback or None to do nothing. def action(): return dict(form=SQLFORM(db.table).process(onsuccess=my_callback) |
FORM.process.__get__ |
<type 'method-wrapper'>
belongs to class <type 'method-wrapper'>
descr.__get__(obj[, type]) -> value |
FORM.process.__getattribute__ |
<type 'method-wrapper'>
belongs to class <type 'method-wrapper'>
x.__getattribute__('name') <==> x.name |
FORM.process.__hash__ |
<type 'method-wrapper'>
belongs to class <type 'method-wrapper'>
x.__hash__() <==> hash(x) |
FORM.process.__init__ |
<type 'method-wrapper'>
belongs to class <type 'method-wrapper'>
x.__init__(...) initializes x; see help(type(x)) for signature |
FORM.process.__new__ |
<type 'builtin_function_or_method'>
belongs to class <type 'builtin_function_or_method'>
T.__new__(S, ...) -> a new object with type S, a subtype of T |
FORM.process.__reduce__ |
<type 'builtin_function_or_method'>
belongs to class <type 'builtin_function_or_method'>
helper for pickle |
FORM.process.__reduce_ex__ |
<type 'builtin_function_or_method'>
belongs to class <type 'builtin_function_or_method'>
helper for pickle |
FORM.process.__repr__ |
<type 'method-wrapper'>
belongs to class <type 'method-wrapper'>
x.__repr__() <==> repr(x) |
FORM.process.__self__ |
<type 'NoneType'>
belongs to class <type 'NoneType'>
|
FORM.process.__setattr__ |
<type 'method-wrapper'>
belongs to class <type 'method-wrapper'>
x.__setattr__('name', value) <==> x.name = value |
FORM.process.__sizeof__ |
<type 'builtin_function_or_method'>
belongs to class <type 'builtin_function_or_method'>
__sizeof__() -> int size of object in memory, in bytes |
FORM.process.__str__ |
<type 'method-wrapper'>
belongs to class <type 'method-wrapper'>
x.__str__() <==> str(x) |
FORM.process.__subclasshook__ |
<type 'builtin_function_or_method'>
belongs to class <type 'builtin_function_or_method'>
Abstract classes can override this to customize issubclass(). This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached). |
FORM.process.im_class |
<type 'type'> extends (<class 'gluon.html.DIV'>,)
belongs to class <type 'type'>
Examples: >>> from validators import IS_NOT_EMPTY >>> form=FORM(INPUT(_name="test", requires=IS_NOT_EMPTY())) >>> form.xml() '<form action="#" enctype="multipart/form-data" method="post"><input name="test" type="text" /></form>' a FORM is container for INPUT, TEXTAREA, SELECT and other helpers form has one important method:: form.accepts(request.vars, session) if form is accepted (and all validators pass) form.vars contains the accepted vars, otherwise form.errors contains the errors. in case of errors the form is modified to present the errors to the user. |
FORM.process.im_func |
<type 'function'>
belongs to class <type 'function'>
Perform the .validate() method but returns the form Usage in controllers:: # directly on return def action(): #some code here return dict(form=FORM(...).process(...)) You can use it with FORM, SQLFORM or FORM based plugins:: # response.flash messages def action(): form = SQLFORM(db.table).process(message_onsuccess='Sucess!') return dict(form=form) # callback function # callback receives True or False as first arg, and a list of args. def my_callback(status, msg): response.flash = "Success! "+msg if status else "Errors occured" # after argument can be 'flash' to response.flash messages # or a function name to use as callback or None to do nothing. def action(): return dict(form=SQLFORM(db.table).process(onsuccess=my_callback) |
FORM.process.im_self |
<type 'NoneType'>
belongs to class <type 'NoneType'>
|