[Twisted-Python] Woven using wrong model adapter

Donovan Preston dp at twistedmatrix.com
Tue May 27 01:56:24 EDT 2003

On Monday, May 26, 2003, at 10:02 PM, Kevin Turner wrote:
> Am I violating some unwritten contract here which says "a model factory
> must always return models with the same interface"?

A model factory must always return an object with the same identity 
within one request. See DeferredModel for an example of how to change 
the behaviour of an IModel implementor without changing it's identity. 
You really shouldn't be doing conditional rendering with a wmfactory 
anyway; put the conditional in the View, where it belongs.


More information about the Twisted-Python mailing list