[Twisted-Python] Woven using wrong model adapter
Donovan Preston
dp at twistedmatrix.com
Mon May 26 23:56:24 MDT 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.
dp
More information about the Twisted-Python
mailing list