Maybe on your model there is more than you showed :
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_node
1,te
That unfortunately gives a ticket with this information:
sqlite3.IntegrityError: FOREIGN KEY constraint failed
On Thursday, 6 July 2023 at 15:02:05 UTC+2 Massimiliano wrote:
> try this:
>
> {{db.next_list.insert(**db.next_list._filter_fields({ "node" : "test1" ,
> "next_node":"test2" }))}}
>
> Il
try this:
{{db.next_list.insert(**db.next_list._filter_fields({ "node" : "test1" ,
"next_node":"test2" }))}}
Il giorno gio 6 lug 2023 alle ore 13:47 Rick ha
scritto:
> 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
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)}}
{{db.next_list.insert(**db.next_list._
4 matches
Mail list logo