(self, admin)
return new_permissions
Return a clone of the permission wrapper with a new model_admin bind
        to it.
Return a clone of the permission wrapper with a new model_admin bind
        to it.
Return a clone of the permission wrapper with a new model_admin bind to it .
def bind_admin(self, admin):
        '''
        Return a clone of the permission wrapper with a new model_admin bind
        to it.
        '''
        if isinstance(admin, str):
            try:
                admin = self._model_admin.admin.get_admin_by_name(admin)
            except ValueError:
                return ''
        new_permissions = self.clone()
        new_permissions._view = None
        new_permissions._model_admin = admin
        return new_permissions
def bind_admin ( self , admin ) : if isinstance ( admin , str ) : try : admin = self . _model_admin . admin . get_admin_by_name ( admin ) except ValueError : return '' new_permissions = self . clone ( ) new_permissions . _view = None new_permissions . _model_admin = admin return new_permissions