[web2py] Re: what is an id map? In the context of import_from_csv_file for pydal (web2py)

2018-07-24 Thread Kevin Huang
Thanks for the response Leonel! On Wednesday, July 25, 2018 at 12:25:50 AM UTC+8, Leonel Câmara wrote: > > Ideally you would save the id_map from the first time you imported, you > can then supply the same id_map to the import_from_csv_file function so it > would update the records instead of in

[web2py] Re: what is an id map? In the context of import_from_csv_file for pydal (web2py)

2018-07-24 Thread Kevin Huang
So let's say I have a CSV with: id,name 1,Bob 2,Mary 3,John let's say I update the CSV to the following: id,name 1,Bob 2,Sue 3,John How would I use id_map parameter to make this change happen so the table updates appropriately? On Tuesday, July 24, 2018 at 7:10:21 PM UTC+8, Leonel Câmara wro

[web2py] what is an id map? In the context of import_from_csv_file for pydal (web2py)

2018-07-24 Thread Kevin Huang
Hi all, This should be simple, but what is the id_map specified in import_from_csv_file(*csvfile*, *id_map=None*, *null=''*, *unique='uuid'*, *id_offset=None*, *transform=None*, *validate=False*, ***kwargs*) function from https://pydal.readthedocs.io/en/latest/#pydal.base.DAL.Table.import_fr

Re: [web2py] Unit testing apis

2018-03-08 Thread Kevin Huang
Thanks all for the replies, I was able to go to gluon.globals and get the HTTP 400 error to show what the problem was, turns out the request was still sending args and vars from the previous test. Oddly enough, clearing the request variables and arguments (setting them to [] for instance) was

[web2py] Unit testing apis

2018-03-07 Thread Kevin Huang
Hi all, I'm relatively new to web2py, and still trying to find more resources, but i've hit a wall, and I'm not quite sure on this issue I'm working with: So working with the "guide" from http://web2py.com/AlterEgo/default/show/260, I'm trying to create a few unit tests to test some RESTFUL