Setup A Django Application

Setup A Django Application

ยท

1 min read

Step 1 - Install Python

You need to have Python before installing Django

Windows

Go to python.org and download the executable run through installation

Linux

In linux chances are that you already get python installed but if not install for your distribution

Debian/Ubuntu

sudo apt-get install python3

Arch/Manjaro

sudo pacman -S python

Fedora/Redhat

sudo dnf install python3

Gentoo

sudo emerge -a python

Mac OS

In mac os you already get python pre installed

Step 2 - Setup Virtual Environment

We can create a virtual env so we can keep packages seperate for our project

Install Virtual Env

pip install virtualenv

Create a VirtualEnv

virtualenv venv

Activate VirtualEnv

source venv/bin/activate

Step 3 - Install Django

To Install Django Run The Following Command:

pip install django

Step 4 - Create New Django Project

To create a new django project run the following command:

django-admin startproject my-project

Step 5 - Create Admin User

To create a admin user run the following command

python manage.py createsuperuser

Run The App !

python manage.py runserver
ย