table is there, curl is there, but how about something you coded in the controller ? Without that we can't help you .
On Wednesday, November 7, 2012 7:48:28 PM UTC+1, Mike Anson wrote: > > > Greetings... > > I have a bash script that uses cURL to send a json packet of data in order > to save it in sqlite DB. > > #!/bin/bash > message=$1 > uid=$2 > url="https://somehost" > curl -v -k -X POST -H "Content-Type: application/json" --data > "{\"message\": \"This will prbbly be my lst post.\", \"uid\": \" > m...@email.com <javascript:>\"}" $url > > ** message and uid are hardcoded at this point but will take the values > dynamically once I see it working. > > Here is my table defined: > > db.define_table('messages', > Field > <https://apps00.cs.lldns.net:8000/examples/global/vars/Field>('uid', > 'string'), > Field > <https://apps00.cs.lldns.net:8000/examples/global/vars/Field>('message', > 'text'), > Field > <https://apps00.cs.lldns.net:8000/examples/global/vars/Field>('status', > 'string', default='unsent'), > Field > <https://apps00.cs.lldns.net:8000/examples/global/vars/Field>('added', > 'datetime', default=request > <https://apps00.cs.lldns.net:8000/examples/global/vars/request>.now), > Field > <https://apps00.cs.lldns.net:8000/examples/global/vars/Field>('modified', > 'datetime', default=request > <https://apps00.cs.lldns.net:8000/examples/global/vars/request>.now)) > > *I've tried many variations of the cURL command and ran in to various errors. > The above cURL command gives the error: *<type 'exceptions.KeyError'> 'id' > > Any help would be greatly appreciated. > > --