[Zope-DB] sql method error control
Aaron Fosdick
aaron at hypervision.com
Tue Nov 16 13:36:44 EST 2004
This is as much a tal question as database, but hopefully someone has a
quick answer. It's prompted by msnbot crawling my site and not following
query parameters.
Let's say you have a sql method in a page:
http://xyz.com/form_result_html?param1=value
<div tal:define="results python:here.some_query('param1');">
...
</div>
If a user enters a URL without the parameter 'param1', ex:
http://form_result_html , an error results: name 'param1' not defined.
What is the best way to manage the error? Should I check if the
parameter exists and assign a value or redirect if it doesn't; and what
would the tal code look like?
Thanks in advance,
--Aaron
More information about the Zope-DB
mailing list