Skip to main content

How to install Django step by step easily

 

How to install Django in windows easily!

The step-by-step process of how to install Python and Django in your Windows machine.


Are you excited? Let’s go...

Step 1: Check if python3 is installed already.

Inside cmd


where python

(It should print paths to the python3 where it’s installed)


Step 2: Install Python in windows if you don’t have one.

Search python on google, or you can click here for the official python website. 


Hover your mouse on the Downloads section and click on Windows. 

Now you should see the python releases page for windows,

click on your desired python3.x version, recommended version 3.7+


Scroll down ⇾ click on Windows installer based on your system architecture

(You can check your system architecture here).


Follow the guidelines of installation setup, while installing make sure you’ve checkedAdd python to path”. For the full process of installing python click here.


Step 3: Check python has recognized in your windows command prompt.

Inside cmd


python --version

(It should print the version you installed in your system)


(Next, the step you are waiting for…)


Step 4: Install Django and fire up the Django server.

Inside cmd 


#install django with pip

pip install Django

(this will install the latest version of Django in your system)


#start project with django-admin

django-admin startproject yourprojectname

(this will create a project with all the required files to start a django web application)


cd exampleproject


#setup database tables for django application

python manage.py makemigrations

(output should be "No Changes detected")

python manage.py migrate

(output: Applying all migrations)


#Fire up the server

python manage.py runserver

(It should start the server in your localhost http://127.0.0.1:8000/”)


If you came up to this point without any step missing, and hoping there are no errors, then congratulations you’ve successfully installed the Django framework, and 


Now you can copy the link address and paste into your browser’s search bar.

You should see this beautiful rocket page ready to launch…

If you found this article helpful in setting up Django share it with your friends and help them in the same. 

If you have any suggestions, then please let me know in the comments section.


And also subscribe to me so that you receive notifications whenever I post web-related articles.






   

 




Comments

Here are some posts you should view for more information.

How to Code Properly | Best Practices

  How to Code Properly?  | Best Practices This blog c overs the best practices that should follow whenever you code.   Ask yourself , do you care about your code readability, when it works fine? I think most of us NOT including me but, I realized later, how important readability of code is.    This article helps you follow best practices in your coding career. So without any delay let’s dive in…   R eadability of Code is the universal aspect in the whole Computer Programming.    Being a Programmer doesn’t mean you just write the code that works fine, but it should be written smartly and looks pleasantly! to eyes, so that your team or people that work with it afterward, can understand it easily.     ➤ Consistent Indentation: In most of the programming languages, spaces and indentations do not affect the function or method, but it compromises with readability, edit, and understanding of code.  So the rule of thumb is to be consistent with your style.   If you are using an IDE, it is re

My journey from graduate to Python Developer and mistakes I made in the same

Let's Get Started...                                                                                                                                 What you should expect from this blog... Mistakes that are made by me throughout the course of Computer Engineering. How I should avoid those mistakes with appropriate decisions. Why I chose python as my primary software developer tool. How did I learn my first programming language? Top myths about Python programming language. How I got my first job? Note: This blog going to be big, I divided it into different parts, In this blog, I only shared what are the mistakes made by me and how you should avoid them. so in this blog 1st, one of those above bullet points is going to be covered  Mistakes that are made by me throughout the course of engineering and the cost I paid for that. My first and big mistake about my computer engineering that cost  1.5 years of waste of valuable time. When I already know that I'm gonna take my admission