'Given a model and an HTTP method, return the list of permission
codes that the user is required to have.'

def get_required_permissions(self, method, model_cls):

    kwargs = {u'app_label': model_cls._meta.app_label, u'model_name': model_cls._meta.model_name}
    if (method not in self.perms_map):
        raise exceptions.MethodNotAllowed(method)
    return [(perm % kwargs) for perm in self.perms_map[method]]
