Support for Django 1.5

Hey, I made some minor changes to make it compatible with Django 1.5

Cheers!