I am new to coding and trying to learn how to create my first Django project. I have downloaded all the software needed to run VS Code. I follow the steps in Mosh’s first and second video under “Building Web Applications with Django” but when I input “code .” in my terminal to switch over to VS Code it does not include the “manage.py” under the root project folder. Am I missing something?! I have followed the video step by step several times over with the same issue, very lost…
Can you post some screenshots
The first screenshot is what is in the terminal just like the video says, the second is what it pulls up on VS Code and there are 2 problems.
1- There is not a “vidly” file attached to the “vidly” folder so there is no way to input code
2- It does not include the “manage.py” under the “vidly” folder.
Is it possible I do not have something dowloaded in order for it to work properly?
Hi I try to answer your problems below:
-
There should be no ‘vidly’ file created when you install django and start a new app. There should be a vidly folder created and you are in it in your vscode, you can see because the arrow is down next to vidly
-
I can see the manage.py file is there in your vidly folder, 3rd from the bottom.
First off thank you for your help so far, I thought the format was wrong therefore it wasn’t working. When I run “python3 manage.py runserver” it gives me an error. I have attached the screenshot so you can see.
Take a look at this link for more information on your error
it seems some others that was doing mosh course got the same errors. Try installing the latest version of django which I believe is v4.1.6
Django 4.1.5 is the latest version. I did run that and followed the steps also creating a new project name. Every step of the way works until it comes to running the server again and it pops up with the same message
Did you select the python interpreter in vs code on the bottom like mosh does in the video and make sure your virtual environment is activated in the terminal (you can see if it has the current folder name in parethesis) before running the python3 manage.py runserver command?
Yes I did do that. I ended up getting it to work, I had to run “python3 manage.py migrate” first then “cd vidly” and finally “python3 manage.py runserver” and it worked. If I’m being totally honest I have no idea what any of that changes but it worked so I’ll take it. Thank you so much for your help!!!