I have a simple web2py app that implements a RESTful API. In my model, I have something like:
db.define_table('vehicles',
Field('flightId', type='string', default='00000', length=128,
.
.
.
Field('route', 'reference path'),
)
db.define_table('path',
Field('coordinates', type='list:integer', requires=IS_NOT_EMPTY()))
I want my vehicle to be able to reference a path, which is then managed by another database entry. This path, of course, will be given by coordinate pairs in latitude/longitude so actually a list of tuples would be best. Is there a more sensible way to do this? How would I post a list of ints? Could I just use requests
to do this?
The client needs to be able to query the vehicle a lot, but I would like not to send the full path each time this happens as there are many points along the path. I'm totally out of my element with web stuff, so I appreciate any help, tips or resources anyone can provide in this regard.