Posts under "Web Development"

Another way of writing custom contexts for Django
Posted on Fri 27 Jan 2012 under Web Development

While searching and experimenting for ways to pass context variables to templates in Django, I found a way that avoids the longer route of passing a custom context function through TEMPLATE_CONTEXT_PROCESSORS in the settings file and using RequestContext in every view function. The approach involves creating a single function that returns a context dictionary and just using this to update every view function where the custom context is needed.

Read more...
Install and run Django like any other Mac app using DjangoApp
Posted on Wed 21 Dec 2011 under Web Development

DjangoApp (renamed as Portable Django) grew out of a need to package a Django project into a desktop application. Instead of embedding it within a desktop GUI program, my solution was to build a self-contained Python/Django environment that can be launched by a simple launcher app. I figured that this can be useful for development purposes as well as for learning. 

Read more...
How to build a web app using Bottle with Jinja2 in Google App Engine
Posted on Thu 27 Oct 2011 under Web Development

Bottle is a fast, simple and lightweight WSGI micro web-framework for Python. It is similar to Flask, but it is even more lightweight and minimal. In fact, the whole framework is contained in a single 44kb file (as of version 0.9.6). If you don't need many of the built-in functions in Flask or any bigger Python web framework, I personally recommend to use Bottle. Now, I am using it to build a simple static website in Google App Engine. Bottle is pluggable to other modules if there's a need to add other goodies. 

Read more...