django.apps only exists in Django 1.7 and up
Start the uglyness. Django < 1.7 cannot handle fields = '__all__'
Use get_model_name inside get_permission_codename instead of crashing
Unfunnily, Django 1.7 requires django-mptt-dev