>
> I'm trying to pass a SELECT as follows:
> def showToolEntries():
> if request.args(0) in ToolsDB.tables:
> return dict(entries=SELECT("Select from list", operationalToolsDB
> ().select(ToolsDB[request.args(0)].serial_number)))
>
SELECT() takes either a list or a set of positional arguments. Since you
passed "Select from list" as the first argument, it takes the result of
your db select (which is a Rows object) as a positional argument and puts
it all in a single <option> element. The Rows object is serialized into an
HTML table, which apparently the browser compresses to a single row.
Instead, try something like this:
SELECT("Select from list",
*[r.serial_number for r in ToolsDB().select(ToolsDB[request.args(0)].
serial_number)])
Anthony