copy django-modeldict module to reduce external dependencies