Hello web2py folks. I am making a mileage tracker and ran into a
small problem. Here's part of my model:
dbmileage.define_table('places',
SQLField('name'),
SQLField('bbuser_id', dbmileage.bbuser))
dbmileage.define_table('distances',
SQLField('origin', dbmileage.places),
SQLField('destination', dbmileage.places),
SQLField('distance','double'))
dbmileage.define_table('trips',
SQLField('origin', dbmileage.places),
SQLField('destination', dbmileage.places),
SQLField('date', 'date', default=now),
SQLField('bbuser', dbmileage.bbuser))
The 'trips' table pulls both the 'origin' and 'destination' from the
'places' table. What is the best way to ensure that a user selects
different 'places' on an SQLFORM (i.e. don't allow trips with the same
origin and destination)
Thanks!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
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/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---