twisted.web.vhost.NameVirtualHost(resource.Resource)
class documentationtwisted.web.vhost
(View In Hierarchy)
I am a resource which represents named virtual hosts.
Method | __init__ | Initialize. |
Method | listStaticEntities | Undocumented |
Method | getStaticEntity | Undocumented |
Method | addHost | Add a host to this virtual host. |
Method | removeHost | Remove a host. |
Method | render | Implementation of resource.Resource's render method. |
Method | getChild | Implementation of resource.Resource's getChild method. |
Method | _getResourceForRequest | (Internal) Get the appropriate resource for the given host. |
Inherited from Resource:
Method | listStaticNames | Undocumented |
Method | listNames | Undocumented |
Method | listEntities | Undocumented |
Method | listDynamicNames | Undocumented |
Method | listDynamicEntities | Undocumented |
Method | getDynamicEntity | Undocumented |
Method | delEntity | Undocumented |
Method | reallyPutEntity | Undocumented |
Method | getChildWithDefault | Retrieve a static or dynamically generated child resource from me. |
Method | getChildForRequest | Undocumented |
Method | putChild | Register a static child. |
Method | render_HEAD | Default handling of HEAD method. |
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)
(Internal) Get the appropriate resource for the given host.
Implementation of resource.Resource's render method.
Implementation of resource.Resource's getChild method.