DEV Community

Asif Shahzad
Asif Shahzad

Posted on • Edited on

Django Installation Easy Steps

Django is a high-level Python web framework that encourages rapid development and clean, pragmatic design. It is built by experienced developers. Here Django installations steps are explained:

1. Create virtual environment

python -m venv venv
.\venv\Scripts\activate # For Windows
source venv/bin/activate # For Mac

2. Install Django

Pip install django
Pip install --upgrade pip

3. Create Project

django-admin startproject mysite
cd mysite
python manage.py runserver

4. Create App

python manage.py startapp main

5. For image field install library

pip install pillow
Sometimes it shows error so use the following code:
pip install pillow==8.0.0
python -m pip install --upgrade pip
python -m pip install --upgrade pillow

6. To check installed Libraries

pip list

7. To Uninstall Library

pip uninstall library_name

8. Admin

python manage.py makemigrations
python manage.py migrate
python manage.py migrate --run-syncdb
Python manage.py createsuperuser

Learn more about Django, visit our website https://kodewhiz.com/courses/django

Oldest comments (0)