circuits.web.controllers module
Controllers
This module implements ...
-
circuits.web.controllers.expose(*channels, **config)
-
class circuits.web.controllers.ExposeMetaClass(name, bases, dct)
Bases: type
-
class circuits.web.controllers.BaseController(*args, **kwargs)
Bases: circuits.core.components.BaseComponent
initializes x; see x.__class__.__doc__ for signature
-
channel = '/'
-
uri
Return the current Request URI
-
forbidden(description=None)
Return a 403 (Forbidden) response
Parameters: | description (str) – Message to display |
-
notfound(description=None)
Return a 404 (Not Found) response
Parameters: | description (str) – Message to display |
-
redirect(urls, code=None)
Return a 30x (Redirect) response
Redirect to another location specified by urls with an optional
custom response code.
Parameters: |
- urls (str or list) – A single URL or list of URLs
- code (int) – HTTP Redirect code
|
-
serve_file(path, type=None, disposition=None, name=None)
-
serve_download(path, name=None)
-
expires(secs=0, force=False)
-
class circuits.web.controllers.Controller(*args, **kwargs)
Bases: circuits.web.controllers.BaseController
initializes x; see x.__class__.__doc__ for signature
-
circuits.web.controllers.exposeJSON(*channels, **config)
-
class circuits.web.controllers.ExposeJSONMetaClass(name, bases, dct)
Bases: type
-
class circuits.web.controllers.JSONController(*args, **kwargs)
Bases: circuits.web.controllers.BaseController
initializes x; see x.__class__.__doc__ for signature