def get_form(self, request, obj=None):
        form = super(PostTypeAdmin, self).get_form(request, obj)
        for field_name, field in form.base_fields.items():
            if not self.can_change_field(request, obj, field_name):
                del form.base_fields[field_name]
        return form
Returns a Form class (used by add_view and change_view) modified to
dataset/ETHPy150Open chuckharmston/django-tumblelog/tumblelog/admin.py/PostTypeAdmin.get_form