How to Solve NameError: name 'add_plugin' is not defined -- cms

Solution: Import the 'add_plugin' module

To Solve the error, add the following line to the top of your code.

from cms import add_plugin

 

For more information:
Python cms add_plugin