Tag Archives: python

Install PIL with Jpeg support on Ubuntu Oneiric 64bit

I am posting this because it took me ages to figure out how to solve this one.

I could not get PIL to compile with JPEG, Zlib or freetype support on my virtualenv. I am using Ubuntu Oneiric Beta1 on a Lenovo Thinkpad X220. That is a 64bits installation. Continue reading

Posted in en, geek, programacion, Python | Tagged , , , | 5 Comments

Using object_list generic view for pagination in Django

Whenever I want to display a list of items I’ll need pagination, calculate first page, next page, total pages, current page, previous page, etc. Although Django comes with pretty good pagination helpers, I’ve found that using the list_detail.object_list generic view … Continue reading

Posted in django, en, geek, programacion | Tagged , | 2 Comments

Access MEDIA_URL from static Javascript files in Django

This is an old trick, that’s been very handy . Many times for various reasons you’ll need to access your media files from your Javascript files, to display images, change paths, or whatever. And in most cases your development MEDIA_URL … Continue reading

Posted in django, en, geek, programacion, web | Tagged , , | 4 Comments

Django cheap pages

Sometimes I end up using Django for the wrong thing, just to dispatch pages and put all my content in the templates. Flatpages are too flat and other DB based content tools are too complex. I just want to use … Continue reading

Posted in django, en, geek, programacion, web | Tagged , , , | Leave a comment