django1.7 compatability fixes