Ubuntu 10.10 Pentax K-5

Friday, March 22, 2013

django Plugins used

1. django-schedule (for event of calendar)
https://github.com/bartekgorny/django-schedule

2. django-photologue (for gallery)
https://code.google.com/p/django-photologue/
https://code.google.com/p/django-photologue/wiki/ReadMe

Install PIL on mac (Snow Leopard) for django


http://proteus-tech.com/blog/cwt/install-pil-in-snow-leopard/
(转)
====


 I download libjpeg latest version (http://www.ijg.org/files/jpegsrc.v7.tar.gz), untar it, and configure it:

$ tar zxvf jpegsrc.v7.tar.gz
$ cd jpeg-7
$ ./configure --enable-shared --enable-static
$ mzake
$ sudo make install
Now, you just installed libjpeg into /usr/local/lib. So, it's time to install PIL. Download the PIL source code from http://effbot.org/downloads/Imaging-1.1.6.tar.gz then untar it:

$ tar zxvf Imaging-1.1.6.tar.gz
$ cd Imaging-1.1.6
This is the trick, you must open setup.py with your prefered text editor then looking for the line JPEG_ROOT = None and then it to JPEG_ROOT = libinclude("/usr/local") then save the file and continue:

$ python setup.py build
If everything fine, you can install PIL to your system library. If the PIL need something that didn't exist, it will tell you on the error message. You may install the missing library via fink or download and compile it by yourself. Then install the PIL as root:

$ sudo python setup.py install --optimize=1

* python selftest.py still shows "lib jpeg not available", but fact is that I can use it already