[Twisted-Python] Woven using wrong model adapter
Kevin Turner
acapnotic at twistedmatrix.com
Mon May 26 19:13:05 MDT 2003
I have:
components.registerAdapter(model.ObjectWrapper,
interests.InterestChangeReport,
wovenInterfaces.IModel)
class Page(page.Page):
def wmfactory_report(self, request):
if sometimes:
return deferredInterestChangeReport()
else:
return ''
If the first page I serve after starting the server gets an
InterestChangeReport, then everything works just fine. However, if the
first page served gets '', then any future page that gets an
InterestChangeReport dies with an exception: "the submodel was not
found in [<twisted.web.woven.model.StringModel instance at 0x85167c4:
wrapped data: <InterestChangeReport instance...>"
So why does woven persist in using the StringModel adapter in this case,
and how can I get it to stop?
Don't know if this is related or not, but the log shows messages like:
"Warning: There was no parent for node [...]; node not mutated." Is
that something I should be concerned about?
Thanks,
- Kevin
--
The moon is waning crescent, 16.8% illuminated, 25.6 days old.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: </pipermail/twisted-python/attachments/20030526/bdd105c7/attachment.sig>
More information about the Twisted-Python
mailing list