Initial port to python 3, run tool 2to3 and fix problems with new django versions