Fix deprecation notices for django 1.5+