Category Archives: Web2py
Using Views To Generate Emails
The Web2py book has a section on using views to generate emails. As far as it goes, it’s a nice technique and is explained well, but briefly, in the book. One of the things that isn’t mentioned, though, that comes … Continue reading
Keeping Flexible on Database Design
One thing that writing for Google App Engine is teaching me is that you have to keep flexible on your database design. Google App Engine doesn’t like joins, so you have to avoid them. However, there isn’t just one technique … Continue reading
Many To Many Using Google App Engine Lists
I ran across a case today where I needed a many to many relationship, but denormalizing the relationship to make it faster on Google App Engine would have meant duplicating almost all the data on the table. Since I did … Continue reading
File Uploads and Downloads
Web2py supports file uploads and downloads out of the box. That’s an important part of what I need to do with my site, so I decided to test it early. I created a model with a field whose type was … Continue reading
Getting Current User’s Email
Web2py has a lot of documentation, but you’ll find things you want to do that simply aren’t covered (at least, not where I could find). One of those is getting the current user’s information, such as email, first name, last … Continue reading
Simple Authentication
Web2py includes, out of the box, a basic registration and login mechanism. What’s missing is you saying what pages should be accessible to which users. There are two components to this. First is removing menu items based on the user … Continue reading
Using SQLFORM
I’m still working through learning how to use SQLFORM. Here’s the basic code in a controller method: form = SQLFORM(db.contest) if form.accepts(request.vars, session): response.flash = “Form submitted” return dict(form=form) This creates a form that has an input field for every … Continue reading
Web2py and Forms
I’m not a big fan of user interfaces that exist primarily to create and update database tables. I think it’s because I came to programming long before I learned anything about databases. In my mind, a database is a back … Continue reading
Learning Curve
Like any framework, Web2py has a learning curve. I’m not talking about the time it takes to master the framework, but the time it takes to start making progress on what you really want to do, which is develop the … Continue reading
Where To Start?
When you first start Web2py, you’re presented with a basic site that gives you access to administrative functions of the framework. There’s an excellent wizard that will generate a lot of the boilerplate of an application for you, especially an … Continue reading