How to install Django on Windows 10.

Windows Articles

How to install Brackets in Windows 10 plus extensions

Hello! Brackets is an open-source code editor designed by Adobe for web developers. Additionally, it has a very simple and modern interface...

How to install Docker on OpenSUSE 15.2 / 15.1?

Docker is a fairly popular technology in today’s sysadmin. It is logical to think because it means a complete change in the...

How to analyze the network with IP Tools for Android

Hi! If you want to analyze and adjust the network almost professionally, then this post is for you. Indeed, IP Tools is...

How to install GNU Fortran on Ubuntu 20.04 / 18.04?

Not everything old is bad. This is how it is. Well, while it is true that there are many programming languages today, there are...

How to install Unity Desktop on Ubuntu 20.04?

Unity Desktop was for a long time the default desktop environment in Ubuntu. Thanks to this, Ubuntu gained a great personality and...

Hi, how are you? It’s a real pleasure to be with you again. In this opportunity, we are going to talk about a free and open-source web application framework written in Python. Indeed, I’m talking about Django. A web framework is a set of components that help to develop websites easier and faster. In other words, Django is a web framework designed to make applications of any complexity in a very reasonable time. In addition, its fundamental goal is to facilitate the creation of complex websites. As you can see, it is a framework of undoubted utility. Consequently, let’s see how to install Django on Windows 10.

Prerequisites

Django’s installation is managed from PIP. This is a package management system used to install and manage software packages written in Python. Consequently, it is indispensable to have Python installed in Windows 10. To know how to do it, please check here.

Preparing for installation.

In the first place, creates a folder in any location. I recommend the root directory. In this folder, the projects will be saved. Likewise, assign the name you want. In this case, I’ll use django.

Create a folder with the name django and place it in the root of the directory.
Create a folder with the name django and place it in the root of the directory.

Create a virtual environment for the project.

In order to develop the project, it is necessary to create a virtual environment. With this in mind, open a Command Prompt and use the CD command to go to the django folder.

cd..
cd..
cd django

Once inside the folder, proceed to create the environment, typing the following command:

py -m venv osradar

Please remember to replace osradar with the name you want to assign to the virtual environment.

Creating the virtual environment
Creating the virtual environment

Once the environment is created, all that remains is to activate it. With this in mind, please type the following command:

osradar\Scripts\activate
Activate the environment.
Activate the environment.

Downloading at installing Django

As we said at the beginning, in order to install Django, you need to use PIP. So, open a CMD from the project folder previously activated, and enter the following command:

 pip install Django==3.0.2

Press enter and wait for the wizard to download and install the framework.

Downloading and installing Django.
Downloading and installing Django.

After installing Django, it’s time to verify the installation. To do so, type the following command:

pip freeze
Testing Django's installation
Testing Django’s installation

If everything is working correctly, the console should display the version of the installed items.

Create a new project.

Then create your first project in Django. With this in mind, open a Command Prompt from the virtual environment and execute this command:

django-admin startproject Liberator

Please remember to replace the word Liberator with the name of your project.

Create a new project.
Create a new project.

Running the server

After the project is created, it’s time to run the server. With this in mind, open a CMD from the newly created project folder. Then execute this command:

python manage.py runserver

Press enter, if everything is correct the server will start.

Django server running
Django server running

After starting the server, please copy the IP address to your web browser.

Django's server running successfully.
Django’s server running successfully.

We’ve finally seen how to install Django on Windows 10. From now on you can use this powerful framework written in Python. That’s all for now, please share this post on your social networks. See you next time.

More articles

1 COMMENT

  1. Amazing Editorial!!
    I appreciate the fact that you have explained all the information in depth.
    Well researched & well-listed post, especially those who didn’t know how to install Django on Windows 10, they will get support for sure. Keep focusing on such topics.
    Thanks for sharing such a valuable post.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest article

How to install Brackets in Windows 10 plus extensions

Hello! Brackets is an open-source code editor designed by Adobe for web developers. Additionally, it has a very simple and modern interface...

How to install Docker on OpenSUSE 15.2 / 15.1?

Docker is a fairly popular technology in today’s sysadmin. It is logical to think because it means a complete change in the...

How to analyze the network with IP Tools for Android

Hi! If you want to analyze and adjust the network almost professionally, then this post is for you. Indeed, IP Tools is...

How to install GNU Fortran on Ubuntu 20.04 / 18.04?

Not everything old is bad. This is how it is. Well, while it is true that there are many programming languages today, there are...

How to install Unity Desktop on Ubuntu 20.04?

Unity Desktop was for a long time the default desktop environment in Ubuntu. Thanks to this, Ubuntu gained a great personality and...