How to Solve NameError: name 'db' is not defined -- south
Solution: Import the 'db' module
# Add the following line to the top of your code
from south.db import db
For more information:
south db
# Add the following line to the top of your code
from south.db import db
For more information:
south db