views:

132

answers:

0

I want to disable editing ALL objects within a particular TabularInline instance, while still allowing additions and while still allowing editing of the parent model.

I have this trivial setup:

class SuperviseeAdmin(admin.TabularInline):
  model = Supervisee

class SupervisorAdmin(admin.ModelAdmin):
  inlines = [SuperviseeAdmin]

admin.site.register(Supervisor, SupervisorAdmin)

I have tried adding a has_change_permission function to SuperviseeAdmin that returns False unconditionally, but it had no effect.

I have tried setting actions = None in SuperviseeAdmin but it had no effect.

What might I be overlooking that could get this to work?