[Twisted-Python] Woven: access to submodels

Mary mary-twisted at puzzling.org
Fri Aug 8 23:05:44 EDT 2003


On Sat, Aug 09, 2003, Mary wrote:
> In my blog model, obviously there are authors that don't exist. So
> /author/Mary/ would be represented by a ChildPage Resource, but
> /author/Donovan/ should 404. Is that possible in a code structure like
> this, or is it too late to produce the appropriate error at the:
>     <span model="." view="Text"> ncxnz</span>
> stage, which is the first time Twisted Web needs to wait on our Deferred
> main model?

OK, as per discussion on IRC, I used a DeferredResource instead, and
return a ChildPage if the database query finds an author and an
ErrorPage otherwise.

-Mary




More information about the Twisted-Python mailing list