class NameVirtualHost(resource.Resource): (source)
Method | __init__ |
Initialize. |
Method | addHost |
Add a host to this virtual host. |
Method | getChild |
Implementation of resource.Resource's getChild method. |
Method | getStaticEntity |
Undocumented |
Method | listStaticEntities |
Undocumented |
Method | removeHost |
Remove a host. |
Method | render |
Implementation of resource.Resource's render method. |
Class Variable | default |
Undocumented |
Instance Variable | hosts |
Undocumented |
Method | _getResourceForRequest |
(Internal) Get the appropriate resource for the given host. |
Inherited from Resource
:
Method | delEntity |
Undocumented |
Method | getChildForRequest |
Undocumented |
Method | getChildWithDefault |
Retrieve a static or dynamically generated child resource from me. |
Method | getDynamicEntity |
Undocumented |
Method | listDynamicEntities |
Undocumented |
Method | listDynamicNames |
Undocumented |
Method | listEntities |
Undocumented |
Method | listNames |
Undocumented |
Method | listStaticNames |
Undocumented |
Method | putChild |
Register a static child. |
Method | reallyPutEntity |
Undocumented |
Method | render_HEAD |
Default handling of HEAD method. |
Class Variable | isLeaf |
Signal if this IResource implementor is a "leaf node" or not. If True, getChildWithDefault will not be called on this Resource. |
Class Variable | server |
Undocumented |
Instance Variable | children |
Undocumented |
Add a host to this virtual host.
This will take a host named `name', and map it to a resource `resrc'. For example, a setup for our virtual hosts would be:
nvh.addHost('divunal.com', divunalDirectory) nvh.addHost('www.divunal.com', divunalDirectory) nvh.addHost('twistedmatrix.com', twistedMatrixDirectory) nvh.addHost('www.twistedmatrix.com', twistedMatrixDirectory)
twisted.web.resource.Resource.getChild