Using LOAD to insert HTML dynamically into an existing page One way to speed up web applications is to load only part of a web page at a time using jQuery. You insert HTML into a running page using web2py’s versatile LOAD helper. This example creates a simple todo list application. What makes it different from a stock web2py app is that while the index() view displays a grid of all the existing tasks, it […]
Month: April 2015
web2py Handsontable tutorial #1: Populating a Handsontable grid using web2py
Updated 5/9/2015: replaced obsolete CRUD class with SQLFORM, changed CDN, and reformatted code to fit narrower viewports This tutorial shows how to create a data entry form for a To Do app in web2py and to display all To Do records on the home page using a Handsontable control. Handsontable is an Excel-like grid control written in Javascript. It’s one of those commercial-quality products that happen to be available free. From the web2py admin interface, create an […]
web2py shortcuts
Eliminate intermediate variables Not yet sure if this is considered idiomatic web2py or Python, but you can replace this: With this, which eliminates a variable and saves a function call. Probably considered more C style than Python:
Recent Comments