#NEWLINE# def has_delete_permission( self , request , obj = None ) : #NEWLINE# #INDENT# "\n        Returns True if the given request has permission to change the given\n        Django model instance, the default implementation doesn't examine the\n        `obj` parameter.\n\n        Can be overridden by the user in subclasses. In such case it should\n        return True if the given request has permission to delete the `obj`\n        model instance. If `obj` is None, this should return True if the given\n        request has permission to delete *any* object of the given type.\n        " #NEWLINE# opts = obj . opts #NEWLINE# codename = get_permission_codename ( 'delete' , opts ) #NEWLINE# return request . user . has_perm ( ( '%s.%s' % ( opts . app_label , codename ) ) )