Package twisted :: Package web :: Package woven :: Module model :: Class DictionaryModel

[show private | hide private]
[frames | no frames]

## Class DictionaryModel

    Model --+
            |
      Wrapper --+
                |
               DictionaryModel

I wrap a Python dictionary and allow it to interact with the Woven models and submodels.

Method Summary
| `__init__(self, orig)` (inherited from `Wrapper`)
| `__cmp__(self, other)` (inherited from `Model`)
| `__getstate__(self)` (inherited from `Model`)
| `__repr__(self)` (inherited from `Wrapper`)
| `addSubview(self, name, subview)` (inherited from `Model`)
| ``addView`(self, view)` Add a view for the model to keep track of. (inherited from `Model`)
| `getData(self)`
| ``getSubmodel`(self, name)` Get the submodel `name' of this model.
| ``initialize`(self, *args, **kwargs)` Hook for subclasses to initialize themselves without having to mess with the __init__ chain. (inherited from `Model`)
| ``lookupSubmodel`(self, submodelName)` Look up a full submodel name. (inherited from `Model`)
| ``notify`(self, changed)` Notify all views that something was changed on me. (inherited from `Model`)
| ``removeView`(self, view)` Remove a view that the model no longer should keep track of. (inherited from `Model`)
| `setData(self, data)` (inherited from `Wrapper`)
| ``setSubmodel`(self, name, value)` Set a submodel on this model.
| ``submodelCheck`(self, name)` Check if a submodel name is allowed. (inherited from `Model`)
| `submodelFactory(self, name)` (inherited from `Model`)

Method Details

### getSubmodel(self, name)

Get the submodel `name' of this model. If I ever return a Deferred, then I ought to check for cached values (created by `setSubmodel`) before doing a regular Deferred lookup.

  Overrides:
    `twisted.web.woven.model.Model.getSubmodel` (inherited documentation)

### setSubmodel(self, name, value)

Set a submodel on this model. If getSubmodel or lookupSubmodel ever return a Deferred, I ought to set this in a place that lookupSubmodel/getSubmodel know about, so they can use it as a cache.

  Overrides:
    `twisted.web.woven.model.Model.setSubmodel` (inherited documentation)

Generated by Epydoc 1.1 on Sat Feb 15 21:18:19 2003 | http://epydoc.sf.net