How to Solve NameError: name 'post_save' is not defined -- django

Solution: Import the 'post_save' module

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

from django.db.models.signals import post_save

 

For more information:
Python django post_save