Custom Search

Sunday, May 24, 2020

How to Install and Setup Django on Ubuntu 20.04 18.04

sudo apt-get python3-pip

python3 -V
pip3 -V

pip3 install django
ls /home/anna/.local/bin
export PATH=$PATH:/home/anna/.local/bin
django-admin --version

django-admin startproject myapp
cd myapp
python3 manage.py migrate

python3 manage.py createsuperuser

vi myapp/settings.py
ALLOWED_HOSTS = ['ip-address-of-server']

python3 manage.py runserver 0.0.0.0:8000

No comments:

Post a Comment