def _get_default_permissions(self, method, view):
        """
        Given a view and a HTTP method, return the list of permission
        codes that the user is required to have.
        """
        kwargs = {
            'app': view.model._meta.app_label,
            'model': view.model._meta.model_name,
        }
        perms1 = [perm % kwargs for perm in self._methods_map[method]]
        kwargs = {
            'app': view.relation._related_model._meta.app_label,
            'model': view.relation._related_model._meta.model_name,
        }
        perms2 = [perm % kwargs for perm in self._methods_map[method]]
        return perms1 + perms2
dataset/ETHPy150Open django-bmf/django-bmf/djangobmf/core/permissions/__init__.py/RelatedPermission._get_default_permissions/original