Django Code Swarm

25 June, 2008 - 0 comments

I admit, this is very geeky, but also kind of fascinating, a visualization of the Django commit history:

Django Code Swarm

Google App Engine

08 April, 2008 - 0 comments

Google has just released what could be regarded as a bomb, the Google App Engine, basically a development environment and scallable web hosting, which even includes Google's own database system.

It's Python based, and even includes the Django web framework.

It looks like the popularity of Python based development is going to explode...

Installing PIL on the Mac

14 March, 2008 - 0 comments

The Python Imaging Library, PIL, is a very useful addition to your Python installation if you need to manipulate pictures. Django uses it to validate upload images for example.

On a Mac you do need to install libjpeg beforehand.

Install libjpeg:

  • Get the source: http://www.ijg.org/files/jpegsrc.v6b.tar.gz

  • Extract the archive.

  • Move inside the source directory and execute the following commands:

    cp /usr/share/libtool/config.sub .
    cp /usr/share/libtool/config.guess .
    ./configure --enable-shared
    make
    sudo mkdir -p /usr/local/include
    sudo mkdir -p /usr/local/bin
    sudo mkdir -p /usr/local/lib
    sudo mkdir -p /usr/local/man/man1
    sudo make install
    

Install PIL:

  • Get PIL at: http://effbot.org/downloads/Imaging-1.1.6.tar.gz

  • Extract the archive.

  • Move inside the source directory

  • Change the following values in setup.py from the default None to:

    JPEG_ROOT = "/usr/local/include"
    ZLIB_ROOT = "/usr/local/include"
    
  • Check if everything is well configured:

    python setup.py build_ext -i
    python selftest.py
    
  • If no errors are found and the required libraries are installed (like JPEG support), install PIL:

    sudo python setup.py install
    

And that's it, I've tried this on Mac OS Leopard, and it works fine, let me know how it went for you.

Django Log

14 March, 2008 - 0 comments

This section will have a collection of tips and techniques about Django and Python, stuff I find useful to publish while I'm developing Django sites.