Python3 Porting

Tested on django 1.6.5 and python 3.4