How to Solve NameError: name 'table_name' is not defined -- appName

Solution: Import the 'table_name' module

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

from appName.models import table_name

 

For more information:
Python appName table_name