Hi,
I have defined tables:
db.define_table('BL',
Field('name'),
format='%(name)s'
)
db.define_table('PL',
Field('name'),
Field('BL_name', 'reference BL'),
format='%(name)s'
)
db.define_table('PRO',
Field('name'),
Field('BL_name', 'reference BL'),
Field('PL_name', 'reference PL'),
format='%(name)s'
)
db.define_table('ALL',
Field('PRO','reference PRO'),
Field('PL','reference PL'),
Field('BL','reference BL')
)
Now i want to import csv into ALL table with:
import_from_csv_file(file,delimiter=",",id_map={})
I'm receiving error:
<type 'exceptions.ValueError'> invalid literal for long() with base 10:
"the cell value of the filed here"
It works only when I provide the referenced fields ID's into csv file.
I would like to import the csv with the string values that are defined in
the BL,PL,PRO tables.
Any ideas how to make the import_from_csv_file accepts the "name" fields
from the tables instead of id's ?
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.