My question title is misleading, what I want to accomplish is using a CSV 
file, formatted in the manner below, to update both the 'owner' data table 
and the 'owner-food' relational table. Assuming here I have 3 tables, 
'person', 'fav food', and 'owner-food' which is a relational table (many to 
many).


person.ID         |          person.name             |         fav food 
                    |
1                      |          name1                       |         
food1, food2              |
2                      |          name2                       |         
food2, food3              |
3                      |          name3                       |         
food1, food3              |


I'm unfamiliar with the use of UUID, as it's not really documented in the 
book. If I was to define a table using UUID, would it look something like 
this:

db.define_table('table1',
Field('title'),
Field('age'),
Field('uuid'))



On Wednesday, July 18, 2012 3:35:22 AM UTC-7, Johann Spies wrote:
>
> On 18 July 2012 03:41, Mark Li <markruole...@gmail.com> wrote:
>
>> I am also unable to import a CSV file using the list:reference format 
>> (exporting then importing with no changes still doesn't work). I get the 
>> error message :
>>
>> Unable to parse CSV file
>>
>> 'nonetype'object has no attribute '__getitem__'
>>
>>
>>
> I am not sure exactly what you want to achieve.  Compare the headings of 
> the csv-file with the table definition and make sure they correspond.
>
> If your exported tables are referenced or are referencing other tables, 
> that reference will be broken unless you export and import the whole 
> database as described in the web2py book.
>
> Also see this thread:
>
>
> https://groups.google.com/forum/?fromgroups#!topicsearchin/web2py/group:web2py$20AND$20subject:uuid/web2py/0X3ykXLmcEQ
>  
>
> especially Massimo's remark near the end of the thread.
>
> Regards
> Johann
> -- 
> Because experiencing your loyal love is better than life itself, 
> my lips will praise you.  (Psalm 63:3)
>
>

-- 



Reply via email to