Archive for the ‘Django’ Category

Django vs Pylons

This is an attempt to make a non-biased comparison between Django and Pylons. I did a brief comparison of the two at work since we needed a web framework for our new project.
We are making a web application that will serve as a frontend to a bank database. The application is going to allow bank [...]

Maybe exceptions are not so awesome after all

Maybe I got a bit rusty on my 1 month vacation, but today I ran into a simple problem that I spent 2 hours solving. I Am working on a website made in Django and I decided to make some changes to the model in one of the apps in the project. I currently have [...]

A recursive django template tag

Here is my attempt to create a "silver bullet" tag for printing tree structures with the Django templating language. It's far from a silver bullet, tho, but it can do basic stuff:
It's a modification of the standard "for" tag and i have kept the counter, counter0, first and last variables, only this time they are [...]

Python 2.6, Leopard 10.5.6 and psycopg 2.0.10

Psycopg2 is the postgreSQL adapter for Django. If you are trying to set it up on Mac OSX (using the supplied setup.py script) you may run into an error saying
File "setup.py", line 219, in finalize_options
NameError: global name 'w' is not defined

This is a simple thing to fix: open the setup.py file coming with psycopg2 and [...]

Configuring Django to work with your OSX X (Leopard) apache

I hope that I finally got it right, since I can see the admin interface and the media files are being served by the same development server as the site. The machine is an Intel MacBook running OS X 10.5.6 and python 2.6.1 I suggest reading the official Django documentation on setting it [...]

Install mod_python on Mac OS X

This is not my article, i copied it from here for safe keeping.
First, you?ll need to grab the source to mod_python. I recommend version 3.3.1, which is what I?ve worked with. Then, you?ll need to unpack it:
$ tar xvzf mod_python-3.3.1.tar
$ cd mod_python-3.3.1
$ ./configure --with-apxs=/usr/sbin/apxs
At that point, the configuration script will spit out a lot of [...]