def on_define_product(table):
if 'product' in request.function :
if table.signoff == 'No':
table.signoff.represent = lambda signoff, field: SPAN(signoff,
_class = 'text-error')
elif table.signoff == 'Yes':
table.signoff.represent = lambda
Aside from the code below, somewhat simpler approaches would be to
manipulate request.post_vars *before* calling SQLFORM, or using an
onvalidation function (which allows you to change form.vars after
validation but before the db insert). With those approaches, you don't have
to manually do the
ok, my responses are inline your post
On Friday, June 6, 2014 9:34:00 PM UTC+2, DeanK wrote:
I'm have a few things that need clarification and am also experiencing
some odd behavior with the scheduler. I'm using my app's db instance
(mysql) for the scheduler.
mysql is the
yes, you are right, my fault, my code only produce one color, thank you so
much for your detail explaination, anthony.
e.g.
if 'product' in request.function :
table.status.represent = lambda status, field: SPAN(status, _class
= 'text-success' if status == 'Sold' else 'text-warning'
Note, it would be more appropriate to use lambda status, row:, as the
second value passed to the represent function is the Row object (not the
Field object). You might be thinking of custom validators, which are passed
the value being validated and the Field object.
Anthony
On Saturday, June
If you use db = DAL('mongodb:...')
tables get automatically an integer id field. It is not auto-increment
and it is stored as a UUID by mongo. web2py converts the UUID to an integer
and back so that web2py does not break.
On Thursday, 5 June 2014 23:08:03 UTC-5, Leonardo Tada wrote:
I know
It was not not been updated since web2pyslices.com
On Friday, 6 June 2014 02:47:34 UTC-5, chuan137 wrote:
It is quite helpful for me, I read it and like the way it explains things.
But why is it called 'old'? The techniques are no longer ideal or it just
stop updating?
I wish there is such
If you are doing a left join:
db(db.person.id
0).select(db.person.ALL,db.thing.ALL,left=db.thing.on(db.thing.owner_id==
db.person.id))
if you are doing an inner join:
db(db.person.id
0).select(db.person.ALL,db.thing.ALL,join=(db.thing.owner_id==db.person.id
))
which is equivalent to
Any plan to embed Bootstrap 3 into web2py ?
Greg
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to
9 matches
Mail list logo