P
P
PavelTN2019-07-17 16:36:42
Django
PavelTN, 2019-07-17 16:36:42

Where to create 'manage.py' on Windows?

Hello. The problem described above has occurred. It seems that I do everything according to the textbook, but apparently I misunderstand something.
In general, as I understand it, before using the code in cmd ( python manage.py migrate ), it displays:
' C:\Python\python.exe: can't open file 'manage.py': [Errno 2] No such file or directory '.
Can you please tell me where to create this file?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Sergey Gornostaev, 2019-07-17
@PavelTN

It does not need to be created, it is created automatically when you run the django-admin startproject command .

D
datka, 2019-07-17
@datka

When you open CMD you must provide the full path to manage.py . he does not find it.
In the folder where manage.py is located, hold down Shift + Right-click on an empty space and then select Open command window and then python manage.py migrate
or use cmd with the cd command to switch to the folder where manage.py is located

D
Dmitry, 2020-12-27
@Squirel_Net

in Windows, the console command is different:
django-admin.py startapp <application name>
and simply by executing django-admin.py in the console you can see all its commands

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question