updates to comply with django 1.5.x code base