How to insert rows from a view-file? The site doesn't produce any error, but an empty row is added to the database.:
From the model file
db.define_table('next_list', Field('node'), Field('next_node'))From the view file:
{{nextrows = db(db.next_list)}}What's wrong? Thanks in advance for help and ideas!
--
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+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/ac174d5a-8245-44e5-b708-08258a60f70fn%40googlegroups.com.
db.define_table('next_list', Field('node'), Field('next_node'))
db.next_list.insert(**db.next_list._filter_fields({ "node" : "test1" , "next_node":"test2" }))
print(db(db.next_list).select())next_list.id,next_list.node,next_list.next_node1,test1,test2
db.next_list.insert(**db.next_list._filter_fields({ "node" : "test1" , "next_node":"test2" }))
print(db(db.next_list).select())next_list.id,next_list.node,next_list.next_node1,test1,test22,test1,test2
To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/4e07ad77-4727-44a8-8710-bda5909cb287n%40googlegroups.com.