updated to stick with django 1.4