Package twisted :: Package web :: Module distrib :: Class UserDirectory
[frames | no frames]

Class UserDirectory

Resource --+        
           |        
  Controller --+    
               |    
   Model --+   |    
           |   |    
 MethodModel --+    
               |    
        View --+    
               |    
            Page --+
                   |
                  UserDirectory


Method Summary
  getChild(self, name, request)
Look for a factory method to create the object to handle the next segment of the URL.
  wmfactory_base(self, request)
  wmfactory_directory(self, request)
    Inherited from Page
  __init__(self, *args, **kwargs)
  renderView(self, request)
    Inherited from MethodModel
  getSubmodel(self, request, name)
Get the submodel `name' of this model.
  submodelCheck(self, request, name)
Allow any submodel for which I have a submodel.
  submodelFactory(self, request, name)
Call a wmfactory_name method on this model.
    Inherited from Model
  __getstate__(self)
  addSubview(self, name, subview)
  addView(self, view)
Add a view for the model to keep track of.
  dataWillChange(self)
  getData(self, request)
  initialize(self, *args, **kwargs)
Hook for subclasses to initialize themselves without having to mess with the __init__ chain.
  invalidateCache(self)
Invalidate the cache for this object, so the next time getData is called, it's getter method is called again.
  lookupSubmodel(self, request, submodelName)
Look up a full submodel name.
  notify(self, changed)
Notify all views that something was changed on me.
  removeView(self, view)
Remove a view that the model no longer should keep track of.
  setData(self, request, data)
  setGetter(self, getter)
  setSetter(self, setter)
  setSubmodel(self, request, name, value)
Set a submodel on this model.
    Inherited from Controller
  aggregateInvalid(self, request, input, data)
  aggregateValid(self, request, input, data)
  domChanged(self, request, widget, node)
  exit(self, request)
We are done handling the node to which this controller was attached.
  gatheredControllers(self, v, d, request)
  getDynamicChild(self, name, request)
This method is called when getChild cannot find a matching wchild_* method in the Controller.
  getSubcontroller(self, request, node, model, controllerName)
  handle(self, request)
By default, we don't do anything
  importControllerLibrary(self, namespace)
  makeView(self, model, templateFile, parentCount)
  pageRenderComplete(self, request)
Override this to recieve notification when the view rendering process is complete.
  process(self, request, **kwargs)
  render(self, request)
Trigger any inputhandlers that were passed in to this Page, then delegate to the View for traversing the DOM.
  setNode(self, node)
  setSubcontrollerFactory(self, name, factory, setup)
  setUp(self, request, *args)
  setupControllerStack(self)
  setView(self, view)
  wchild_index(self, request)
By default, we return ourself as the index.
    Inherited from Resource
  delEntity(self, name)
  getChildForRequest(self, request)
  getChildWithDefault(self, path, request)
Retrieve a static or dynamically generated child resource from me.
  getDynamicEntity(self, name, request)
  getStaticEntity(self, name)
  listDynamicEntities(self, request)
  listDynamicNames(self)
  listEntities(self)
  listNames(self)
  listStaticEntities(self)
  listStaticNames(self)
  putChild(self, path, child)
Register a static child.
  reallyPutEntity(self, name, entity)
  render_HEAD(self, request)
Default handling of HEAD method.
    Inherited from View
  __setitem__(self, key, value)
  dispatchResult(self, request, node, result)
Check a given result from handling a node and look up a NodeMutator adapter which will convert the result into a node and insert it into the DOM tree.
  dispatchResultCallback(self, result, request, node)
Deal with a callback from a deferred, checking to see if it is ok to send the page yet or not.
  generate(self, request, node)
Allow a view to be used like a widget.
  getNodeController(self, request, node, submodel, model)
Get a controller object to handle this node.
  getNodeModel(self, request, node, submodel)
Get the model object associated with this node.
  getNodeView(self, request, node, submodel, model)
  getSubview(self, request, node, model, viewName)
Get a sub-view from me.
  getTemplate(self, request)
Override this if you want to have your subclass look up its template using a different method.
  handleControllerResults(self, controllerResult, request, node, controller, view)
Handle a deferred from a controller.
  handleDocument(self, request, document)
Handle the root node, and send the page if there are no outstanding callbacks when it returns.
  handleNewNode(self, request, returnNode)
  handleNode(self, request, node)
  handleOutstanding(self, request)
  importViewLibrary(self, namespace)
  lookupTemplate(self, request)
Use acquisition to look up the template named by self.templateFile, located anywhere above this object in the heirarchy, and use it as the template.
  modelChanged(self, changed)
Rerender this view, because our model has changed.
  recurseChildren(self, request, node)
If this node has children, handle them.
  renderFailure(self, failure, request)
  sendPage(self, request)
Check to see if handlers recorded any errors before sending the page
  setController(self, controller)
  setSubviewFactory(self, name, factory, setup, *args, **kwargs)
  setupAllStacks(self)
  setupViewStack(self)
  unlinkViews(self)

Class Variable Summary
str template = '\n<html>\n    <head>\n    <title>twisted.web...
str userDirName = 'public_html'
str userSocketName = '.twistd-web-pb'
    Inherited from Page
tuple __implements__ = (<class twisted.web.woven.interfaces.IM...
int appRoot: Set this to True if you want me to call request.rememberRootURL() in my getChild, so you can later use request.getRootURL() to get the URL to this "application"'s root resource.
    Inherited from Model
list allowed_names = []
list protected_names = ['initialize', 'addView', 'addSubview'...
    Inherited from Controller
int addSlash = 1                                                                     
list controllerLibraries = []
int setupStacks = 1                                                                     
str templateDirectory = ''
NoneType viewFactory = None                                                                  
    Inherited from Resource
int isLeaf = 0                                                                     
NoneType server = None                                                                  
    Inherited from View
NoneType doneCallback = None                                                                  
int livePage = 0                                                                     
str templateFile = ''
NoneType templateNode = None                                                                  
list viewLibraries = []
int wantsAllNotifications = 0                                                                     

Method Details

getChild(self, name, request)

Look for a factory method to create the object to handle the next segment of the URL. If a wchild_* method is found, it will be called to produce the Resource object to handle the next segment of the path. If a wchild_* method is not found, getDynamicChild will be called with the name and request.
Parameters:
name - The name of the child being requested.
           (type=string)
request - The HTTP request being handled.
           (type=twisted.web.server.Request)
Overrides:
twisted.web.woven.page.Page.getChild (inherited documentation)

Class Variable Details

template

Type:
str
Value:
'''
<html>
    <head>
    <title>twisted.web.distrib.UserDirectory</title>
    <style>
    
    a
    {
...                                                                    

userDirName

Type:
str
Value:
'public_html'                                                          

userSocketName

Type:
str
Value:
'.twistd-web-pb'                                                       

Generated by Epydoc 2.0 on Sat May 15 20:08:04 2004 http://epydoc.sf.net