Last active
December 9, 2020 17:59
-
-
Save badhonhitech/b94a4b7c45466588805e177722c06dc9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# !/bin/sh | |
If you need Django setup in Linux contact with me: | |
Skype:live:badhonhitech | |
Telegram:@badhonhitech | |
Email: [email protected] | |
# 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 my_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 | |
django-admin startproject djangoproject . | |
python manage.py migrate | |
python manage.py createsuperuser | |
# insert user ID, email & password | |
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/ | |
See my video on Django on youtube- https://youtu.be/OBddfO47m04 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment