Changed some more deprecated functions on the way to django 1.7