What happened to DAL(None)?

47 views
Skip to first unread message

p a

unread,
Aug 11, 2019, 12:41:29 PM8/11/19
to web2py-users
Hello:

I have been inactive for some time. I just tried to upgrade from 2.9.12 to the latest version of web2py (2.18.5), and I see that DAL(None) no longer works.

Is there a way to create a database that is not connected to a real database, and leaves no trace after using it?

It was useful to reuse code that receives a table as argument, so that the same code can be used to build and process a complex form.

Regards

Leonel Câmara

unread,
Aug 12, 2019, 11:24:32 AM8/12/19
to web2py-users
DAL(None) still works, you do need to do a bit of setting up if you want to use it for forms, namely set the DAL default validators.

See how SQLFORM.factory does it:

p a

unread,
Aug 13, 2019, 5:48:20 AM8/13/19
to web2py-users
Thanks, Leonel. It wasn't just the validators, I was building queries and doing selects and all, and it has worked for years. But I just adapted my code, no big deal. Your link helped. Have a nice day.
Reply all
Reply to author
Forward
0 new messages