Setting up a Django development environment is not much difficult and can be done by following a few steps. The steps are as below:
Step – 1 Python Installation
As we all know that Django is purely written in Python programming language, and because of that, first you need to install Python on your system. Python comes by default on Linux and Mac systems, and you can simply check using the python command on the terminal. Otherwise, if you want to download the latest version of Python on your system or if you are a Windows user, then you can download Python by visiting Python’s official website:
https://www.python.org/downloads/
Step – 2 Django Installation
After you have successfully installed or updated Python on your system, you can move to the next step to install Django which depends on your Operating system. To download the Django framework, go to the link given below and follow the official download guide for Django:
https://www.djangoproject.com/download/
Step – 3 Setting up the database
There are several database engines supported by Django, and any database engine can be chosen based on your requirements. The list of supported databases is given below:
MySQL - http://www.mysql.com/
Oracle - http://www.oracle.com/index.html
MongoDB - https://django-mongodb-engine.readthedocs.org/en/latest/
SQLite 3 - http://www.sqlite.org/
PostgreSQL - http://www.postgresql.org/
The links to respective database engines are given above, and you can refer to those links for installation.
Step – 4 Django Web Server
The web server provided by the Django framework is very lightweight for developmental and testing activities. The server comes pre-configured, which makes it easy to work with Django and restarts for every modification you do during development and testing.