0

I don't know when and how it started but now I have such a glitch:

  1. open CMD
  2. enter python command: "django-admin.py help"
  3. Visual Studio Code starts up and opens manage.py for editing.
  4. The CMD command itself does not return anything.

  5. on the other hand, if I enter: "django-admin help" (without .py) the CMD shows help and VSCODE does not react in any way.

What is this magic? How to change VSCODE reaction to .py mentioning?

2 Answers 2

1

It also happened to me, i tried creating a django project using django-admin.py startproject example, I asked around and i found out that the django-admin.py does not work on vscode for windows (am not really sure about mac), vscode sees it as a file and not as a command, cause vscode doesnt need the .py extension to execute the command.

Sign up to request clarification or add additional context in comments.

2 Comments

But how VSCode intercepts CMD commands? I mean VSCode is not even launched when I use CMD!!!
Good question. I just read the official django documentation, the command does not include the .py extension.
1

i just had the same issue. I noticed that after i installed pylint on VS Code, i couldn't access the manage.py from CMD. It seemed as though now my system was trying to open the .py with VS code instead of executing it with Python. So i opened the windows file explorer and right clicked on the manage.py icon and clicked on "Open With >> Python" . After that , I was able to start up the app again as usually enter image description here

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.