t.w.s.Site(http.HTTPFactory) : class documentation

Part of twisted.web.server View Source View In Hierarchy

A web site: manage log, sessions, and resources.
Instance Variablescounterincrement value used for generating unique sessions ID.
requestFactoryfactory creating requests objects. Default to Request.
displayTracebacksif set, Twisted internal errors are displayed on rendered pages. Default to True.
sessionFactoryfactory for sessions objects. Default to Session.
sessionCheckTimeDeprecated. See Session.sessionTimeout instead.
Method __init__ Initialize.
Method __getstate__ Undocumented
Method makeSession Generate a new Session instance, and store it for future reference.
Method getSession Get a previously generated session, by its unique ID. This raises a KeyError if the session is not found.
Method buildProtocol Generate a channel attached to this site.
Method render Redirect because a Site is always a directory.
Method getChildWithDefault Emulate a resource's getChild method.
Method getResourceFor Get a resource for a request.
Method _openLogFile Override in subclasses, e.g. to use twisted.python.logfile.
Method _mkuid (internal) Generate an opaque, unique ID for a user's session.

Inherited from HTTPFactory:

Method startFactory Set up request logging if necessary.
Method stopFactory This will be called before I stop listening on all Ports/Connectors.
Method log Log a request's result to the logfile, by default in combined log format.
Method _updateLogDateTime Update log datetime periodically, so we aren't always recalculating it.
Method _escape Undocumented

Inherited from Factory (via HTTPFactory, ServerFactory):

Method doStart Make sure startFactory is called.
Method doStop Make sure stopFactory is called.
def __init__(self, resource, logPath=None, timeout=60 * 60 * 12): (source)
Initialize.
def _openLogFile(self, path): (source)
Override in subclasses, e.g. to use twisted.python.logfile.
def __getstate__(self): (source)
Undocumented
def _mkuid(self): (source)
(internal) Generate an opaque, unique ID for a user's session.
def makeSession(self): (source)
Generate a new Session instance, and store it for future reference.
def getSession(self, uid): (source)
Get a previously generated session, by its unique ID. This raises a KeyError if the session is not found.
def buildProtocol(self, addr): (source)
Generate a channel attached to this site.
def render(self, request): (source)
Redirect because a Site is always a directory.
def getChildWithDefault(self, pathEl, request): (source)
Emulate a resource's getChild method.
def getResourceFor(self, request): (source)

Get a resource for a request.

This iterates through the resource heirarchy, calling getChildWithDefault on each resource it finds for a path element, stopping when it hits an element where isLeaf is true.
API Documentation for Twisted, generated by pydoctor at 2011-10-27 16:27:37.