[web2py] use executesql results in grid
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, but I would lose the inline editing ability as suggested in http://www.web2pyslices.com/slice/show/1928/basic-inline-editing-in-sqlformgrid-no-plugin-no-javascript Thanks -- 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 the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] {{include 'default/%s.html' % step}} does not work in view
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 work? Thanks -- 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 the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] web2py form submit does not take custom widget with x-editable fields
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=field.requires, **{'_data-type': 'text'}) db.define_table('person',Field('name', 'string', widget=string_editable_widget)) The fields are displayed on the form as expected, however when I submit, it shows "Errors in form". Digging deeper, I noticed, when I use plain INPUT, the post request contains: Content-Disposition: form-data; name="name" Some name Yet, with the custom widget, the post request does not contain the above at all, which means the form is not grabbing inputs from the x-editable fields. Please help on how to connect these two. -- 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 the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.