Thank you very much for placing the book online.

The code in section 'CSV and remote Database Synchronization' does not
run, even after indentation is fixed.

Line 7 - there seems to be an extra comma and quote

in the italicized code:

* the underscore is missing from define_table and IS_IN_DB

* missing line "import uuid"

* "default=now" should be "default=request.now"

The following code runs

import uuid
db.define_table('person',
    Field('uuid', length=64, default=uuid.uuid4()),
    Field('modifiedon', 'datetime', default=request.now),
    Field('name'))

db.define_table('dog',
    Field('uuid', length=64, default=uuid.uuid4()),
   Field('modifiedon', 'datetime', default=request.now),
    Field('owner', length=64),
    Field('name'))

db.dog.owner.requires = IS_IN_DB(db, 'person.id')

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.

Reply via email to