Docs for SQLFORM.formstyles

[ Python Tutorial ] [ Python Libraries ] [ web2py epydoc ]

Description


<class 'gluon.storage.Storage'>
























A Storage object is like a dictionary except `obj.foo` can be used
in addition to `obj['foo']`, and setting obj.foo = None deletes item foo.

Example::

>>>
o = Storage(a=1)
>>>
print o.a
1

>>> o['a']
1

>>> o.a = 2
>>> print o['a']
2

>>> del o.a
>>> print o.a
None



Attributes


SQLFORM.formstyles.__class__ <type 'type'> extends (<type 'dict'>,) belongs to class <type 'type'>
A Storage object is like a dictionary except `obj.foo` can be used in addition to `obj['foo']`, and setting obj.foo = None deletes item foo. Example:: >>> o = Storage(a=1) >>> print o.a 1 >>> o['a'] 1 >>> o.a = 2 >>> print o['a'] 2 >>> del o.a >>> print o.a None

SQLFORM.formstyles.__cmp__ <type 'method-wrapper'> belongs to class <type 'method-wrapper'>
x.__cmp__(y) <==> cmp(x,y)

SQLFORM.formstyles.__contains__ <type 'builtin_function_or_method'> belongs to class <type 'builtin_function_or_method'>
D.__contains__(k) -> True if D has a key k, else False

SQLFORM.formstyles.__copy__ <type 'instancemethod'> belongs to class <type 'instancemethod'>

SQLFORM.formstyles.__delattr__ <type 'method-wrapper'> belongs to class <type 'method-wrapper'>
x.__delitem__(y) <==> del x[y]

SQLFORM.formstyles.__delitem__ <type 'method-wrapper'> belongs to class <type 'method-wrapper'>
x.__delitem__(y) <==> del x[y]

SQLFORM.formstyles.__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.

SQLFORM.formstyles.__eq__ <type 'method-wrapper'> belongs to class <type 'method-wrapper'>
x.__eq__(y) <==> x==y

SQLFORM.formstyles.__format__ <type 'builtin_function_or_method'> belongs to class <type 'builtin_function_or_method'>
default object formatter

SQLFORM.formstyles.__ge__ <type 'method-wrapper'> belongs to class <type 'method-wrapper'>
x.__ge__(y) <==> x>=y

SQLFORM.formstyles.__getattr__ <type 'builtin_function_or_method'> belongs to class <type 'builtin_function_or_method'>
D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None.

SQLFORM.formstyles.__getattribute__ <type 'method-wrapper'> belongs to class <type 'method-wrapper'>
x.__getattribute__('name') <==> x.name

SQLFORM.formstyles.__getitem__ <type 'builtin_function_or_method'> belongs to class <type 'builtin_function_or_method'>
D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None.

SQLFORM.formstyles.__getnewargs__ <type 'instancemethod'> belongs to class <type 'instancemethod'>

SQLFORM.formstyles.__getstate__ <type 'instancemethod'> belongs to class <type 'instancemethod'>

SQLFORM.formstyles.__gt__ <type 'method-wrapper'> belongs to class <type 'method-wrapper'>
x.__gt__(y) <==> x>y

SQLFORM.formstyles.__hash__ <type 'NoneType'> belongs to class <type 'NoneType'>

SQLFORM.formstyles.__init__ <type 'method-wrapper'> belongs to class <type 'method-wrapper'>
x.__init__(...) initializes x; see help(type(x)) for signature

SQLFORM.formstyles.__iter__ <type 'method-wrapper'> belongs to class <type 'method-wrapper'>
x.__iter__() <==> iter(x)

SQLFORM.formstyles.__le__ <type 'method-wrapper'> belongs to class <type 'method-wrapper'>
x.__le__(y) <==> x<=y

SQLFORM.formstyles.__len__ <type 'method-wrapper'> belongs to class <type 'method-wrapper'>
x.__len__() <==> len(x)

SQLFORM.formstyles.__lt__ <type 'method-wrapper'> belongs to class <type 'method-wrapper'>
x.__lt__(y) <==> x<y

SQLFORM.formstyles.__module__ <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.

SQLFORM.formstyles.__ne__ <type 'method-wrapper'> belongs to class <type 'method-wrapper'>
x.__ne__(y) <==> x!=y

SQLFORM.formstyles.__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

SQLFORM.formstyles.__reduce__ <type 'builtin_function_or_method'> belongs to class <type 'builtin_function_or_method'>
helper for pickle

SQLFORM.formstyles.__reduce_ex__ <type 'builtin_function_or_method'> belongs to class <type 'builtin_function_or_method'>
helper for pickle

SQLFORM.formstyles.__repr__ <type 'instancemethod'> belongs to class <type 'instancemethod'>

SQLFORM.formstyles.__setattr__ <type 'method-wrapper'> belongs to class <type 'method-wrapper'>
x.__setitem__(i, y) <==> x[i]=y

SQLFORM.formstyles.__setitem__ <type 'method-wrapper'> belongs to class <type 'method-wrapper'>
x.__setitem__(i, y) <==> x[i]=y

SQLFORM.formstyles.__sizeof__ <type 'builtin_function_or_method'> belongs to class <type 'builtin_function_or_method'>
D.__sizeof__() -> size of D in memory, in bytes

SQLFORM.formstyles.__slots__ <type 'tuple'> belongs to class <type 'tuple'>
tuple() -> empty tuple tuple(iterable) -> tuple initialized from iterable's items If the argument is a tuple, the return value is the same object.

SQLFORM.formstyles.__str__ <type 'method-wrapper'> belongs to class <type 'method-wrapper'>
x.__str__() <==> str(x)

SQLFORM.formstyles.__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).

SQLFORM.formstyles.clear <type 'builtin_function_or_method'> belongs to class <type 'builtin_function_or_method'>
D.clear() -> None. Remove all items from D.

SQLFORM.formstyles.copy <type 'builtin_function_or_method'> belongs to class <type 'builtin_function_or_method'>
D.copy() -> a shallow copy of D

SQLFORM.formstyles.fromkeys <type 'builtin_function_or_method'> belongs to class <type 'builtin_function_or_method'>
dict.fromkeys(S[,v]) -> New dict with keys from S and values equal to v. v defaults to None.

SQLFORM.formstyles.get <type 'builtin_function_or_method'> belongs to class <type 'builtin_function_or_method'>
D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None.

SQLFORM.formstyles.getfirst <type 'instancemethod'> belongs to class <type 'instancemethod'>
Returns the first value of a list or the value itself when given a `request.vars` style key. If the value is a list, its first item will be returned; otherwise, the value will be returned as-is. Example output for a query string of `?x=abc&y=abc&y=def`:: >>> request = Storage() >>> request.vars = Storage() >>> request.vars.x = 'abc' >>> request.vars.y = ['abc', 'def'] >>> request.vars.getfirst('x') 'abc' >>> request.vars.getfirst('y') 'abc' >>> request.vars.getfirst('z')

SQLFORM.formstyles.getlast <type 'instancemethod'> belongs to class <type 'instancemethod'>
Returns the last value of a list or value itself when given a `request.vars` style key. If the value is a list, the last item will be returned; otherwise, the value will be returned as-is. Simulated output with a query string of `?x=abc&y=abc&y=def`:: >>> request = Storage() >>> request.vars = Storage() >>> request.vars.x = 'abc' >>> request.vars.y = ['abc', 'def'] >>> request.vars.getlast('x') 'abc' >>> request.vars.getlast('y') 'def' >>> request.vars.getlast('z')

SQLFORM.formstyles.getlist <type 'instancemethod'> belongs to class <type 'instancemethod'>
Returns a Storage value as a list. If the value is a list it will be returned as-is. If object is None, an empty list will be returned. Otherwise, `[value]` will be returned. Example output for a query string of `?x=abc&y=abc&y=def`:: >>> request = Storage() >>> request.vars = Storage() >>> request.vars.x = 'abc' >>> request.vars.y = ['abc', 'def'] >>> request.vars.getlist('x') ['abc'] >>> request.vars.getlist('y') ['abc', 'def'] >>> request.vars.getlist('z') []

SQLFORM.formstyles.has_key <type 'builtin_function_or_method'> belongs to class <type 'builtin_function_or_method'>
D.has_key(k) -> True if D has a key k, else False

SQLFORM.formstyles.items <type 'builtin_function_or_method'> belongs to class <type 'builtin_function_or_method'>
D.items() -> list of D's (key, value) pairs, as 2-tuples

SQLFORM.formstyles.iteritems <type 'builtin_function_or_method'> belongs to class <type 'builtin_function_or_method'>
D.iteritems() -> an iterator over the (key, value) items of D

SQLFORM.formstyles.iterkeys <type 'builtin_function_or_method'> belongs to class <type 'builtin_function_or_method'>
D.iterkeys() -> an iterator over the keys of D

SQLFORM.formstyles.itervalues <type 'builtin_function_or_method'> belongs to class <type 'builtin_function_or_method'>
D.itervalues() -> an iterator over the values of D

SQLFORM.formstyles.keys <type 'builtin_function_or_method'> belongs to class <type 'builtin_function_or_method'>
D.keys() -> list of D's keys

SQLFORM.formstyles.pop <type 'builtin_function_or_method'> belongs to class <type 'builtin_function_or_method'>
D.pop(k[,d]) -> v, remove specified key and return the corresponding value. If key is not found, d is returned if given, otherwise KeyError is raised

SQLFORM.formstyles.popitem <type 'builtin_function_or_method'> belongs to class <type 'builtin_function_or_method'>
D.popitem() -> (k, v), remove and return some (key, value) pair as a 2-tuple; but raise KeyError if D is empty.

SQLFORM.formstyles.setdefault <type 'builtin_function_or_method'> belongs to class <type 'builtin_function_or_method'>
D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if k not in D

SQLFORM.formstyles.update <type 'builtin_function_or_method'> belongs to class <type 'builtin_function_or_method'>
D.update([E, ]**F) -> None. Update D from dict/iterable E and F. If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

SQLFORM.formstyles.values <type 'builtin_function_or_method'> belongs to class <type 'builtin_function_or_method'>
D.values() -> list of D's values

SQLFORM.formstyles.viewitems <type 'builtin_function_or_method'> belongs to class <type 'builtin_function_or_method'>
D.viewitems() -> a set-like object providing a view on D's items

SQLFORM.formstyles.viewkeys <type 'builtin_function_or_method'> belongs to class <type 'builtin_function_or_method'>
D.viewkeys() -> a set-like object providing a view on D's keys

SQLFORM.formstyles.viewvalues <type 'builtin_function_or_method'> belongs to class <type 'builtin_function_or_method'>
D.viewvalues() -> an object providing a view on D's values