I have a django admin view displaying a list of orders. I have added a custom button, which when clicked should perform a certain action.
So I have a function defined in my services.py file as :
def penalty(order):
#Do something
So, how should I call this function when Penalty is clicked. I can create a view, but how to call it?