fix django compilation. closes #231