Is it possible to load a Datagrid without sqlalchemy help ?
Current testing code snippets:
from tw.forms import DataGrid
contactinfo_grid = DataGrid(fields=[
('name','name'),
('surname','surname'),
('phone','phone')
])
and this code inside the controller:
@expose('p1.templates.index')
def index(self):
data=[{'phone': '123456', 'surname': 'Sample', 'name': 'Frank'}]
return dict(page='index', grid=contactinfo_grid, data=data)
in the index.html:
<div>${grid(data)}</div>
Obviously the data is not in the correct format, but what should it look
like?
The idea is to just reuse existing, well tested sql queries from a pyqt
application ,
which we intend to port to tg2 , without going thru sqlalchemy magic.
Thanks for any pointers
Db
--
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/turbogears/-/A57pZW-XqFkJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en.