Django

Installing Django on Windows

In this article I will discuss Installing Django on Windows. Django is a python based framework for web development.

In order to get more details on Django framework as well as its features and benefits, read this article. (https://www.programmingempire.com/introduction-to-django-framework-and-its-features/)

Since Django is a python based framework, so first you need to ensure that Python is running on your machine. For this purpose, just check the version of python. The following screenshot demonstrates it.

Checking the Version of Python
Checking the Version of Python

After that, create a virtual environment in which Django will run. In order to create a virtual environment, run the following command.

Creating a Virtual Environment
Creating a Virtual Environment

As can be seen above first create a folder (if you wish) django and then run the specified command. When you list the directory, you will find that a folder with the given name is created.

Once a virtual environment is created, you can activate it by running the following command.

Activating Virtual Environment
Activating Virtual Environment

Afterwards we can install django by running the following command.

The Result of Installing Django on Windows
The Result of Installing Django on Windows

Now that we have successfully installed Django, we can create our first project. So, you can run the following command.

Creating a Project in Django
Creating a Project in Django

As a result of executing the above command, a project with the specified name is created. Notice that the project folder contains a file called manage.py. With this file you can perform some Django specific tasks. For instance, suppose you want to create an app, you will run the following command.

Creating an app with Django
Creating an app with Django

Also, you can start the web server using manage.py. The following command demonstrates it.

Running Server in Django
Running Server in Django

Now you can open the server page in a browser as follows.

Running the Django Server

More details will be covered in later posts.


Further Reading

Introduction to Django Framework and its Features

Examples of Array Functions in PHP

Basic Programs in PHP

Registration Form Using PDO in PHP

Inserting Information from Multiple CheckBox Selection in a Database Table in PHP

programmingempire

princites.com

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *