Hi here!

I am experimenting with the smartgrid. Very nice time-saving feature
which reminds me why I love web2py! ;-)
(I believe there is still no doc about grid and/or smartgrid?)

I have a problem with linked_tables.

The model looks like this:

db.define_table('person',Field('name'))
db.define_table('relationship',
   Field('personA', db.person),
   Field('relationship_type'),
   Field('personB', db.person)
)

When I use
g = QLFORM.smartgrid(db.person, linked_table=['relationship'])
the action buttons generated include a 'relationship' button twice...
(which makes sense)

Can I avoid this replication? (I am only interested in showing the
existence of a relationship)
Is it possible to have a merge of those two button which will access
all relationships for that person, regardless of the fact it is a
personA or personB in that relationship?

I believe I can go with a custom link here, but I was wondering if
there was a quicker way to achieve this.

I can wait for the 4th version of the book... I had to leave
developing with web2py for a few months and I can no more catch up
with all the amazing new features!  ;-)

Many thanks,

  Olivier





Reply via email to