[web2py] Re: jquery mobile and returning DIV() with content format

2011-09-27 Thread Anthony
You cannot do DIV(..., _data-role=collapsible) because _data-role is not a valid keyword argument in Python due to the hyphen. Instead, you could do: DIV(..., **{'_data-role': 'collapsible'}) or mydiv = DIV(...) mydiv['_data-role'] = 'collapsible' Anthony On Tuesday, September 27, 2011

[web2py] Re: jquery mobile and returning DIV() with content format

2011-09-27 Thread kasapo
Hmmm... so python does not like dashes within an identifier, making this troublesome. You'll have to first off, get ride of the dashes in data-role, maybe just use underscores and rewrite them to be dashes when rendering them in XML. I think your best option is to create a new DIV class (or alter

[web2py] Re: jquery mobile and returning DIV() with content format

2011-09-27 Thread kasapo
Ok, Anthony's idea is like a million times better. -1 for extending the div class :( On Sep 27, 2:32 pm, kasapo kas...@gmail.com wrote: Hmmm... so python does not like dashes within an identifier, making this troublesome. You'll have to first off, get ride of the dashes in data-role, maybe

[web2py] Re: jquery mobile and returning DIV() with content format

2011-09-27 Thread Anthony
On Tuesday, September 27, 2011 3:33:44 PM UTC-4, kasapo wrote: Ok, Anthony's idea is like a million times better. I stole it from a previous post by Massimo. :-)

[web2py] Re: jquery mobile and returning DIV() with content format

2011-09-27 Thread Murray3
thanks guys, i will see if I can get my collapsible list generated from a controller function using Anthony's idea. On Sep 27, 8:39 pm, Anthony abasta...@gmail.com wrote: On Tuesday, September 27, 2011 3:33:44 PM UTC-4, kasapo wrote: Ok, Anthony's idea is like a million times better. I