django views not defined code example Example: NameError: name 'views' is not defined from <your_app> import views # replace <your_app> with your application name.