Updated to conform to django 1.8 deprecation