I'm not sure what this is called so I'm unsure what to search for. I have a function which returns a string I need to use the string returned on my instance object.
action = getattr(instance, action_method)(request)
instance.action
But this always evaluate to instance.action
where I need it to be the value of action.
I have also tried this:
instance.getattr(instance, action_method)(request)