[web2py] Re: How to use SQLFORM.grid

2011-09-21 Thread tomt
Hi, Can SQLFORM.grid be used to display legacy tables, specifically a table that doesn't have a field named 'id', and if so, how? The following is an example of a table I'm currently using in the latest trunk. Dbadmin displays it successfully, but web2py throws an exception when I try to display

Re: [web2py] Re: How to use SQLFORM.grid

2011-08-25 Thread Johann Spies
On 24 August 2011 18:33, Massimo Di Pierro wrote: > I think you want: > > def journal_grid(): >query = db.akb_journal.publisher == db.akb_publisher.uuid >fields = [db.akb_journal.title,db.akb_journal.standard_name, > db.akb_journal.issn, db.akb_journal.abbrev_iso, >

[web2py] Re: How to use SQLFORM.grid

2011-08-24 Thread Massimo Di Pierro
I think you want: def journal_grid(): query = db.akb_journal.publisher == db.akb_publisher.uuid fields = [db.akb_journal.title,db.akb_journal.standard_name, db.akb_journal.issn, db.akb_journal.abbrev_iso, db.akb_publisher.publisher, db.akb_journal.subject] f

[web2py] Re: How to use SQLFORM.grid

2011-08-24 Thread Anthony
I think the first argument should be either a table or a query, but don't pass a table and a query as the first two arguments. Anthony On Wednesday, August 24, 2011 10:09:22 AM UTC-4, spyker wrote: > The following is not working. What is the syntax suppose to be? > > def journal_grid(): >