Adds cms 2.4 & 3.x compatibility.
Drops django < 1.4 support.
PEP 8 cleanup.