Opened 13 years ago

Closed 13 years ago

#16762 closed Bug (duplicate)

Inline delete field

Reported by: rodrigo@… Owned by: nobody
Component: contrib.admin Version: 1.3
Severity: Release blocker Keywords: admin inline delete field
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Since StackedInline and ModularInline are inherited from ModelAdmin, they have also their variables and methods, but when overriding the has_delete_permission method, it doesn't seem to affect any how even writing something like:

class CompartilhamentoPorSetorInline(admin.TabularInline):
    model = CompartilhamentoPorSetor
    verbose_name = 'Compartilhamento por Setor'
    verbose_name_plural = 'Compartilhamento por Setores'
    extra = 1
    
    def has_delete_permission(self, request, obj=None): # THIS! The 'delete' field on the admin form is still able.
        return False

Change History (1)

comment:1 by Julien Phalip, 13 years ago

Resolution: duplicate
Status: newclosed

Thank you for the report but I think this has already been reported in #8060. Please take a look and see whether this is the same issue.

Note: See TracTickets for help on using tickets.
Back to Top