- Now ModelAdmin has a function
def has_add_permission(self, request):
but InlineModelAdmin has a slightly different function
def has_add_permission(self, request, obj):
.
This difference makes it difficult to create common mixins. - Instead of writing in the ModelAdmin class:
def has_add_permission(self, request): return False
we can definecan_add = False