IndexAboutWeblogRecipesProjectsLinksSearchRSS

Categories

ThadeusB python, ai, robots

Download of a file-like python object in web2py

Here are a couple of ways to expose any python file-like object as download-able in a web2py controller. You might want to do this if you have a generated pdf report, or allowing an export of the sites content. From your controller, you can stream

Query between dates

So you need to write a query to get rows that exist between dates. This is a situation where the simplicity of the web2py DAL really shows, and how close it is to SQL really shines.

Table Inheritance with web2py DAL

It is possible to define common db columns, e.g. posted_by, posted_on, etc... once and define on theappropriate table to inherit these common columns. The DAL makes this quite easy. You define a Table with the common fields that you would like to i

web2py dynamic queries

In many cases you might need a query based on multiple sets of information. Think of a search box, where you would like to provide the option to search in multiple areas (title, content, authors) or exclude these areas. Or a customer management system, i