Skip to content

Instantly share code, notes, and snippets.

@afahitech
Last active October 24, 2020 05:40
Show Gist options
  • Select an option

  • Save afahitech/bef394c4496263ec2af803c7f62789b2 to your computer and use it in GitHub Desktop.

Select an option

Save afahitech/bef394c4496263ec2af803c7f62789b2 to your computer and use it in GitHub Desktop.
How to install Django in ubuntu 20.04 LTS
If you need Django installation help, contact with me:
Skype: aataur1
Telegram: @AutoDevOps
WhatsApp: +8801751643484
Email: [email protected]
-------------------------------------------------------------------------------
# !/bin/sh
# Install Packages
sudo apt update
python3 -V
sudo apt install python3-django
django-admin --version
#Install Virtual Environment
sudo apt update
python3 -V
sudo apt install python3-pip
sudo apt install python3-venv
mkdir ~/ataurproject
cd ~/ataurproject
python3.6 -m venv my_env
source my_env/bin/activate
pip install django
django-admin --version
deactivate
cd ~/ataurproject
source my_env/bin/activate
# Development Version Install with Git
sudo apt update
python3 -V
sudo apt install python3-pip
sudo apt install python3-venv
git clone git://github.com/django/django ~/django-dev
cd ~/django-dev
python3.6 -m venv my_env
source ny_env/bin/activate
pip install -e ~/django-dev
django-admin --version
# Creating a Sample Project
mkdir ~/django-test
cd ~/django-test
python3.6 -m venv my_env
source my_env/bin/activate
pip install django
nano ~/django-test/djangoproject/settings.py
ALLOWED_HOSTS ='198.211.99.20', 'localhost', '127.0.0.1'
# Testing the Development Server
sudo ufw allow 8000
python manage.py runserver localhost:8000
http://your_server_ip:8000/admin/
#djangosetup #installdjango #setupdjango
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment