def approve(self, obj): utils.approve_merchant(obj)
def approve_merchant(modeladmin, request, queryset): for merchant in queryset: if merchant.is_merchant and not merchant.is_approved: utils.approve_merchant(merchant)