PS C:\Users\besho\OneDrive\Desktop\DjangoCrushcourse> python manage.py runserver
C:\Users\besho\AppData\Local\Programs\Python\Python312\python.exe: can't open file 'C:\Users\besho\OneDrive\Desktop\DjangoCrushcourse\manage.py': [Errno 2] No such file or directory
PS C:\Users\besho\OneDrive\Desktop\DjangoCrushcourse>
So I created a django file called lecture3 and an app called hello but when I start run server it shows me this error
You probably didn't create your Django project correctly. To create your Django project, from the command line, cd into a directory where you’d like to store your code, then run the following command:
django-admin startproject mysite .
Where mysite
is the name of your project perhaps lecture3
in your case. This would automatically create your manage.py
file. To create an app, make sure you’re in the same directory as manage.py and type this command:
python manage.py startapp myapp
Where myapp
is your app name. It is recommended to do all these in a virtual environment.
See the official Django tutorial.