fix for django 1.5 and remove old unused parts of modelviz.py