A workaround: enclose the value in quotes.
e.g. db.news.link.show_if = (db.news.category=='1')
As a plus, I believe it will keep on working even after running a version
of web2py that has the fix.
On Saturday, November 8, 2014 3:26:30 PM UTC-5, Niphlod wrote:
>
>
> https://github.com/web2py/
https://github.com/web2py/web2py/commit/1e35262e6746dd74485587ddef25205573785ca9
2.9.11 still doesn't include the fix
On Saturday, November 8, 2014 4:44:54 PM UTC+1, DenesL wrote:
>
> May I ask in which release is it fixed?.
> Just re-downloaded 2.9.11 and it has the exact same problem as 2.9.5
>
May I ask in which release is it fixed?.
Just re-downloaded 2.9.11 and it has the exact same problem as 2.9.5
Any request for help should including as much info as required to reproduce
it, the easier one makes it for others to test the more likely you will get
the help you need.
Denes
On Sat
already fixed.
For the future:
- avoid reporting bugs without examples
- check if the bug is still in the latest version (2.9.5 is 8 months ago!)
:-P
On Saturday, November 8, 2014 12:59:50 AM UTC+1, DenesL wrote:
>
> Sure:
>
> # news.py model:
> db.define_table('news',
> Field('category','inte
Sure:
# news.py model:
db.define_table('news',
Field('category','integer'),
Field('title'),
Field('link'),
Field('comments'),
Field('votes','integer'),
)
# action
def news_create():
db.news.link.show_if = (db.news.category==1)
db.news.votes.default = 0
form = SQLFORM(db.ne
care to show an example ?
db.define_table('purchase', Field('have_coupon','integer', default=1),Field(
'coupon_code'))
def index():
db.purchase.coupon_code.show_if = (db.purchase.have_coupon==1)
form = SQLFORM(db.purchase).process()
return dict(form = form)
works totally fine.
On
6 matches
Mail list logo