How to Install & Run Django 5.0.3 in Visual Studio Code (2024)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
welcome to this video guys in this video I'll show you how you can install Django and how you can set up Jango in Visual Studio code first if you don't have Python and visual studio code installed check the links in the description below it will show you how you can install Python and visual studio code once you have installed both let's open our Visual Studio code once you have Visual Studio code open you will see these options here open folder clone repository and create Java project so in your case if you don't have these two extensions you will just see open folder now what we will do is we need to install Jango first right so Jango is a very popular web development and apis development framework for python so you can quickly create apis quickly create websites and all using Jango so we will get into details later on but first let's install Jango now come over here and click on Terminal click on new terminal once this terminal is open you can write commands here now to install packages and libraries for python we have a popular tool called pip that is called pep now we can install python dependencies or python modules or python libraries using pip so to install Django you just type pip install and then DJ n Go that is the spelling of Jango now hit enter and Django installation will start so as you can see now Django installation has started it will take around a minute to complete let's wait till the installation is complete so after the installation is complete you will see this message that says successfully install Jango 5.0.3 so this is the version of Django to make sure you have Django installed you can enter this command python DM and then DJ goo Double Dash version hit enter and this will show you your install Django version that is 5.0.3 so once Django is installed we need to create a project using Jango okay so again to start a project we need to enter a command and the command is DJ ajango dadm n and then start project and then enter your project name let's call this project my first project hit enter and your first project is now created now one thing is where is this project created right so how how do you find out where this project is actually created so there is this command called PWD in Linux and iOS so if you can enter PWD in Linux and iOS and hit enter you will see this path and in Windows you can also enter di hit enter and it will show everything in this current directory and this is where your project is created so let's scroll and as you can see we have this my new project here and if I enter PWD as you can see this is the path where my project is created all right so I can just hold control and click on this inv Visual Studio code to go there so as you can see I have now open that path in my visual studio code but this is not what we want we want to just open that folder right so I'll just close this and I'll just copy this and I will go to this path using my Explorer so so just right click on this and copy this now I can close my view Studio code and what I'll do is I'll browse to that directory manually so I'll go to my Explorer and here I'll paste that path using control V and hit enter and now I have all these files here and my project would be somewhere here where is it yeah here is my project and now what I can do is here click on this bu here and type CMD again and hit enter and command PP will be open right and now what I can do is I can just type c o d and period and hit enter and this project will be open in Visual Studio code all right so as you can see now finally my project is open here and I can see a default file that is created by Jango okay now that is one way but if you are in Linux or iOS what you can do is you can open Terminal or command prompt and you can browse to or change directory to this directory manually or let's close this again just open Visual Studio code right but since I had already opened this it will already open in your case if it is not already open what you can do is click on file and click on open folder and just browse to your folder from here okay it's pretty simple so this is the project and I'll just do select folder and this will also open up project in Visual Studio code okay so now we have created a project and now we have opened the project in Visual Studio code so let's run this and let's see what happens okay again so we will go to terminal and click on new terminal this time as you can see the full path is C users visha and my first project so I'm inside my first project here what you need to do is you need to run Python and this is the fin name manage. py Python and run mpy so what we are doing is we are running manage.py using python hit enter and python do sorry manage.py will be executed okay now we have an error in this command so I entered this because I wanted you to know there are several commands that we can pass to manage.py that is change password create super user check compile messages and all that stuff and the one we are searching for is run server okay so what we do is we do Python and using python we run manage.py and to manage.py We Pass Run server parameter and this run server will run our Django project by default let me show you what happens okay so it is saying starting development server at this URL this is nothing but just a url url like facebook.com or x.com or example.com so this can be changed to all those things when you are when we are finally in the end of the project and check out our brand new awesome coding t-shirt got stick fortop lot more get to from the link hold control and click and this will open in your browser and as you can see Django is now installed and it is saying the install worked successfully now finally in the next video we will change this thing and we will create our own web page if you have any questions let me know in the comments below
Info
Channel: The Code City
Views: 3,914
Rating: undefined out of 5
Keywords: install django in vscode, install and run django in vscode, install and run django in visual studio code, how to install django in vscode, setup django in visual studio code, install django in visual studio code
Id: qN_0EZ8M20Q
Channel Id: undefined
Length: 7min 6sec (426 seconds)
Published: Mon Mar 25 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.