Search Posts

Month: January 2015

web2py one to many database tutorial using SQLFORM.smartgrid

This web2py tutorial has everything you need to create a To Do list featuring a list of users stored in one table, a task database stored in another table, and how to create a one to many relation ship between a user and that user’s list of tasks. It is a complete, feature-rich, database-backed web application and is very near production ready in a total of  about 20 lines of Python and about 30 lines of […]

web2py grid vs. smartgrid

The web2py SQLFORM.grid and SQLFORM.smartgrid controls sound like one should be a subset of the other, but they aren’t. web2py grid vs. smartgrid: Similarities Both the grid and smart grid controls can browse, search, sort, create, update and delete records. Both can accept a table as the first parameter web2py grid vs. smartgrid: Differences Here’s a summary of important differences. The web2py grid First argument: Table or query The web2py smartgrid First argument: Table only (not query) […]

web2py performance

Notes on improving web2py performance. This will be improved later. Lazy Tables According the docs (Lazy Tables, a performance boost), “web2py models are executed before controllers, so all tables are defined at every request. Not all tables are needed to handle each request, so it is possible that some of the time spent defining tables is wasted.”