Resolve django deprecation problems