[web2py] use executesql results in grid

2014-04-14 Thread Yufei Li
I am doing a quite complicated sql select with selects nested, which I do not know how to create using DAL, so I decided to go with executesql with fields specified. My questions is once I get back results of type, is there a way to create a SQLFORM.grid with them? I am able to use SQLTABLE, bu

[web2py] {{include 'default/%s.html' % step}} does not work in view

2014-04-02 Thread Yufei Li
in my view, I am writing something like {{progress=['a','b','c']}} {{for step in progress :}} {{include 'default/%s.html' % step}} {{pass}} It complains as NameError: name 'step' is not defined Which simply does not make sense to me, anyone can please help me on why and how to make it wo

[web2py] web2py form submit does not take custom widget with x-editable fields

2014-03-30 Thread Yufei Li
I am trying to use x-editable fields rather than plain INPUT in my model as in: def string_editable_widget(field, value):return A('', _href='#', _class="%s myeditable" % field.type, _name=field.name, \ _id="%s_%s" % (field._tablename, field.name), _value=value, \ requires=f