i am using the web development with python and web2py part2 video, creating a reddit_clone. When i use the web2py database populate command to add fields to comm table i get a foreign key constraint from this line Field('parent_comm','reference comm'), when Field('parent_comm','reference comm'), is remove from the table definition the populate works ok if i then add Field('parent_comm','reference comm'), it back and then make Field('parent_comm','reference comm', default = 1), it works then if i make it Field('parent_comm','reference comm'), it now populates the data
why am i getting a foreign key constraint on Field('parent_comm','reference comm'), cant populate figure out the relationship and populate the fields this is the full database table definition db.define_table('comm', Field('post', 'reference post'), Field('parent_comm','reference comm'), Field('votes','integer'), Field('body','text'), auth.signature) -- 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.