How to Solve NameError: name 'models' is not defined -- airflow

Solution: Import the 'models' module

# Add the following line to the top of your code
from airflow import models

 

For more information:
airflow models