How to get the current method name in Python

# Want to get Current method name in Django
 
import inspect
currentController = inspect.stack()[0][3]

Here, currentController Holds the method name.

Leave a Reply

Your email address will not be published. Required fields are marked *