Cliff is absolutely right! If all you're storing is True or False, make the
field a boolean. It's much more efficient in all respects. The list: string
and list: reference are most useful if you're storing a reasonably small
number of one to many relationships.
--
---
You received this messa
Field('is_correct', 'boolean', default=False)
In the form you get a checkbox widget unless you choose otherwise.
In the controller:
if form.vars.is_correct:
# do something
else:
#do otherwise
Less typing.
Also, look in your database back end and see how it represents the values.
You will find
Huge thanks!
That worked!
Den fredagen den 8:e mars 2013 kl. 12:45:34 UTC+8 skrev weheh:
>
> What kind of error message are you getting?
>
> I assume the request.vars['lesson'] and request.vars.answer are both
> indices into their respective tables. However, request.vars will be holding
> these
What kind of error message are you getting?
I assume the request.vars['lesson'] and request.vars.answer are both
indices into their respective tables. However, request.vars will be holding
these values as strings. Without knowing more, I would suggest putting an
int() around those two vars, as
4 matches
Mail list logo