Django is a mature Python web framework that was created by a group of Python experts in 2003. The first official release of Django was in 2005. From the beginning, Django was created as a blog engine for Lawrence Journal-World newspaper in USA. Today, Django has become one of the most used web framework in the world. It is maintained and being improved by Django Software Foundation.

 

To start learning Django web framework, we have to install Python programming language and Django packages in our computer. For Python programming language, we could download and install this software from Python.org .

 

To install Django package and to separate it from other package, we need to create a virtual environment by creating a folder and open this folder with Visual Studio Code, and launch a new Terminal window by writing on it as below:

 

$ python3 -m venv myvenv

 

To activate this environment in Linux, we write the command as below:

 

$ source myvenv/bin/activate

 

In Windows, the command is slightly different:

 

myvenv/Scripts/activate

 

Once the environment is activated, we can install Django package by writing the command on Terminal window as below:

 

$ python3 -m pip install Django

 

To be sure that Django package is successfully installed in the virtual environment, we could launch Python interpreter, and try to import Django package as below:

 

(myvenv) sokhhavuh@sokhhavuh-Inspiron-3543:~/Documents/Python/Async Django$ python3
Python 3.8.10 (default, Mar 15 2022, 12:22:08) 
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import django
>>> print(django.get_version())
4.0.5

 

Next, we need to create a Django project by writing command as below on Terminal window.

 

$ django-admin startproject multimedia

 

“multimedia” is the name of our Django project. We could name it whatever we want. For this tutorial, we could name it as “multimedia”, because we will learn how to build a multimedia website through this tutorial.