On 5 April 2011 15:51, Richard Vézina ml.richard.vez...@gmail.com wrote:
About zero option, search in page for zero :
http://www.web2py.com/book/default/chapter/07
http://www.web2py.com/book/default/chapter/07There is some explanation
near IS_IN_SET...
Thanks. I found it.
Johann
--
On 4 April 2011 16:11, Richard Vézina ml.richard.vez...@gmail.com wrote:
Are course_week1 and course_week2 not null??
No.
If not you need ...requires=IS_NULL_OR(IS_IN_DB(your requires) and in
...represent= you should use zero option (see book about that) or something
like that :
On 5 April 2011 09:16, Johann Spies johann.sp...@gmail.com wrote:
Thanks! That solved the problem. I could not find something in the book
about a 'zero option' though.
Now .represent works on the screen but not in the CSV-output. I have used:
{{
import cStringIO
About zero option, search in page for zero :
http://www.web2py.com/book/default/chapter/07
http://www.web2py.com/book/default/chapter/07There is some explanation
near IS_IN_SET...
There maybe more detailed information somewhere else too... I don't use it
in my code since it arrive after I start
I did not use export_to_csv for now... I just test it sometimes ago... But I
guest you should define your .represent for stream table before try to apply
them to your csv output...
Hope it helps.
Richard
On Tue, Apr 5, 2011 at 3:27 AM, Johann Spies johann.sp...@gmail.com wrote:
On 5 April
I want to get a proper representation of a field in the result of a left
join but am struggling to do so.
Here is a simplified version of the problem.
db.define_table('courses',
Field('week','integer', requires=IS_IN_SET([1,2]),
widget =
Are course_week1 and course_week2 not null??
If not you need ...requires=IS_NULL_OR(IS_IN_DB(your requires) and in
...represent= you should use zero option (see book about that) or something
like that :
db.t_registration_form.course_week1.represent=\
lambda value: (value!=None and %(code)s
7 matches
Mail list logo