Package gluon :: Module globals :: Class Response
[hide private]
[frames] | no frames]

Class Response

source code

 object --+        
          |        
       dict --+    
              |    
storage.Storage --+
                  |
                 Response

defines the response object and the default values of its members response.write(....) can be used to write in the output html

Instance Methods [hide private]
new empty dictionary

__init__(self)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
write(self, data, escape=True) source code
 
render(self, *a, **b) source code
 
stream(self, stream, chunk_size=1000000)
if a controller function > return response.stream(file,100) the file content will be streamed at 100 bytes at the time
source code
 
xmlrpc(self, request, methods)
assuming: > def add(a,b): return a+b if a controller function "func" > return response.xmlrpc(request,[add]) the controller will be able to handle xmlrpc requests for the add function.
source code

Inherited from storage.Storage: __delattr__, __getattr__, __getstate__, __repr__, __setattr__, __setstate__

Inherited from dict: __cmp__, __contains__, __delitem__, __eq__, __ge__, __getattribute__, __getitem__, __gt__, __hash__, __iter__, __le__, __len__, __lt__, __ne__, __new__, __setitem__, clear, copy, fromkeys, get, has_key, items, iteritems, iterkeys, itervalues, keys, pop, popitem, setdefault, update, values

Inherited from object: __reduce__, __reduce_ex__, __str__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Returns:
new empty dictionary

Overrides: dict.__init__
(inherited documentation)

xmlrpc(self, request, methods)

source code 

assuming: > def add(a,b): return a+b if a controller function "func" > return response.xmlrpc(request,[add]) the controller will be able to handle xmlrpc requests for the add function. Example: > import xmlrpclib > connection=xmlrpclib.ServerProxy('http://hostname/app/contr/func') > print connection.add(3,4)