[Zope] ZSQL and Python Script

Peter Bengtsson mail@peterbe.com
Mon, 21 May 2001 18:33:36 +0200


> answer = context.REQUEST['answer']
> Thingy = something_else
>
> context.create_answer_sql(answer=answer, thingy=thingy)

That's perfect!
Smells bug or some simple misstake.
what does this return?:

answer = context.REQUEST['answer']
Thingy = something_else
print "Answer: (%s) \nThingy: (%s)"%(answer, thingy)
context.create_answer_sql(answer='dummyvalue', thingy='staticstring')
return printed



Cheers,
Peter
> ...and the values don't turn up in the database if I use <dtmlsql-var
answer
> type=string> but do if I use <dtml-var answer>, but then the quote
escaping
> fails..
>
> I assume this is a namespace problem, any ideas on how to fix it?
>
> Thanks
>
> tom
>
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )