Updating scripts ready for django 1.7