Wednesday 11 January 2017

Ever get the following message when using PTVS and Visual Studio and can't find the solution;

Import error was unhandled by user code.

Settings cannot be imported, because environment variable DJANGO_SETTINGS_MODULE is undefined.

Then check by mistake you have not right clicked on a .py file and "Set as start up file".

To check, go-to your project in solution explorer, then right click, select properties, the startup file should be manage.py, it should not be empty or one of your own files.