pyfarm.agent.http.core.resource module¶
Resource¶
Base resources which can be used to build top leve documents, pages, or other types of data for the web.
- class pyfarm.agent.http.core.resource.Resource[source]¶
Bases: twisted.web.resource.Resource
Basic subclass of _Resource for passing requests to specific methods. Unlike _Resource however this will will also handle:
- rewriting of request objects
- templating
- content type discovery and validation
- unpacking of request data
- rerouting of request to specific internal methods
- TEMPLATE = NotImplemented¶
- CONTENT_TYPES = set(['application/json', 'text/html'])¶
- LOAD_DATA_FOR_METHODS = set(['PUT', 'POST'])¶
- SCHEMAS = {}¶
- putChild(path, child)[source]¶
Overrides the builtin putChild() so we can return the results for each call and use them externally