I have this Improperly configured when I run python script on models.py , I want to be able to test print on my views but this error interrupting it. Do I need to fix this to have my project run properly ? Runserver works with no problem though. I have the necessary app name installed on settings too.
First: In the future, please don’t post images of code, tracebacks, templates, etc. Copy/paste the code (or traceback) into the body of your post surrounded between lines of three backtick - ` characters. This means you’ll have a line of ```, then your code (or traceback), then another line of ```.
You can’t do that. There’s a whole startup process involving Django that needs to be run. Your individual modules within Django (models, views, forms, etc) are not capable of being run outside the environment that Django provides.
If you’re looking for some “interactivity” for working with models from the shell, see the Django shell command.
Okay noted on the images and thank you so much for replying on the error. Thank you !