Installing PostgreSQL 8.3 on Leopard

Date Arrow  April 23, 2008

This is the documented path to my discovery of PostgreSQL 8.3, which I’ve never used before. Now that MySQL’s community is getting hammered to death by Sun, and thanks to all the good things I’ve heard about it over the years (including enhanced performance on multicore systems and greater scalability), I really wanted to install [...]

Tagged   Django · How to? · Open Source · Ruby on RailsComments  Add Your Comment (3)

Quick spec from your Python tests

Date Arrow  April 17, 2008

Using Python’s own unittest package, here’s a small script that can iterate over your test suite to output a small, quick, nice list of the tests in your application:

import unittest

loader = unittest.TestLoader()
tests = loader.loadTestsFromName(’path.to.your.tests.package’)
for test in tests._tests:
print test._tests[0].__class__.__name__.replace(”Test”, “”)
for method in test._tests:
[...]

Tagged   Django · How to? · QualityComments  Add Your Comment (2)

Django Architecture Approaches

Date Arrow  April 4, 2008

I’ve just had a very interesting conversation with my colleague Marco about different approaches to the organization of code inside a Django application.
As you might know (and if you don’t I’ll tell you anyway), Django’s views (somehow occupying the “Controller” level in an MVC architecture) must take (at least) an HttpRequest instance as a parameter and must [...]

Tagged   Architecture · Django · Open SourceComments  Add Your Comment (11)

REST + HTTP (Basic + Digest) Authentication support for Django’s test Client class

Date Arrow  March 5, 2008

Django has a nice support for unit and functional testing; however, its django.test.client.Client class does not support PUT and DELETE requests, which might be useful if, like me, you’re doing some kind of REST implementation using that framework. There’s an open ticket about it, but for the time being, here’s my wrapper that supports those [...]

Tagged   Django · How to?Comments  Add Your Comment (3)

Archimedes Reloaded

Date Arrow  February 29, 2008

Give me an API and I’ll move the web.
OK, I’m actually building the API myself this time. That’s why so few posts this month. RESTful, featuring multiple export formats, secure, configurable, usable on top of any existing Django application. It can even generate its own wrappers in a myriad of programming languages.

Tagged   Django · SoftwareComments  Add Your Comment 

Install MySQL_python in Leopard

Date Arrow  January 15, 2008

I wanted to make my Django blog engine work on Leopard using MySQL as a database engine. I had a hard time making it work, partially because of my lack of knowledge of Python, partially because I am using MAMP instead of a “/usr/local/mysql”-like MySQL installation, partially because of Leopard itself.
The problem is, basically, that [...]

Tagged   Apple · Django · How to?Comments  Add Your Comment (4)

My first Django project

Date Arrow  January 11, 2008

So here it is, my first Django project: the gazillionth blog engine on the planet!. As if there weren’t enough, right? :) Actually it was a practical and easy way to learn the Django project, and the result is pretty neat. Feel free to download it, play with it, and give me [...]

Tagged   Django · Opinion · Ruby on RailsComments  Add Your Comment (20)

Starting with Django in Leopard

Date Arrow  January 9, 2008

As I’ve written earlier, I’m playing with Django these days. It’s a refreshing change, I must say, even if I admit that I prefer Ruby’s syntax to Python’s. Of course that’s just a purely subjective impression (I’m writing this while I try to avoid the rotten tomatoes thrown by angry pythonistas reading this) that does [...]

Tagged   Books · Django · How to?Comments  Add Your Comment 

Django & Leopard & the UTF-8 error

Date Arrow  January 9, 2008

If you use Django on Leopard, you might encounter a strange “Locale UTF-8 not found” error when running your application. This is due to a bug in Terminal.app, albeit an easy to fix one: just go to the Preferences pane / “Settings” page / “Advanced” tab and uncheck the “Set LANG environment variable on startup” [...]

Tagged   Apple · Django · How to?Comments  Add Your Comment (3)

Rails vs. Django

Date Arrow  December 5, 2007

While watching the Google TechTalk about Django, I came accross this interesting paper highlighting differences between Rails and Django, which might be interesting to many of us in the field.
For those interested, Django is a powerful, MVC framework for creating web applications using the Python programming language. It is very similar in some respects to [...]

Tagged   Code · Django · Ruby on RailsComments  Add Your Comment (3)