veni vidi Scripsi

PIL, JPEG and Freetype support on Mac OS X Lion when using Virtualenv

Assuming you're using virtualenv and pip and working in your virutalenv ((your-env)username@computer:~$).

  1. Download PIL, but do not install it:

    $ pip install --no-install PIL
    
  2. For Freetype support: edit setup.py in {your-virtualenv-folder}/build/PIL. On line 40 change FREETYPE­_­ROOT = None to FREETYPE­_­ROOT = libinclude('/usr/X11'):

    # Library pointers.
    #
    # Use None to look for the libraries in well-known library locations.
    Theme: Basic Nature
    
    # Use a string to specify a single directory, for both the library and
    # the include files.  Use a tuple to specify separate directories:
    # (libpath, includepath).  Examples:
    #
    # JPEG_ROOT = "/home/libraries/jpeg-6b"
    # TIFF_ROOT = "/opt/tiff/lib", "/opt/tiff/include"
    #
    # If you have "lib" and "include" directories under a common parent,
    # 
    continue.

TinyMCE in Django

A while ago when I was working with Django I had a really hard time trying to figure out how to get TinyMCE to work in Django. Now it isn't difficult, you just have to know how to do it. So I've written a quick guide on how to make it all work.