Python 3 - To Be a Python Full Stack Developer

By Sheldon L Published at 2019-11-22 Updated at 2019-11-29


Framework

Environment

By pipenv

pip install pipenv

# To remove pipenv
# in the root of the env file (always have a Pipfile in it)
# the prompt should be: `(env_name)name@host:~/..$`

# to remove
pipenv --rm
rm Pipfil*
rm -rf <Project>

By venv

python3 -m venv venv
venv/bin/activate

By Conda

# create and activate environment
conda search "^python$"
conda create --name dj_py38 python=3.8
source activate dj_py38

# check environment
python --virsion
conda info --envs

Set Proxy

export all_proxy=""
pip install pysocks
export all_proxy="socks5://127.0.0.1:1080"

IDE

By VSCode

By Pycharm (Recomended)

Database

UI

Templates

Meterializecss

Online Test

codepen

Deployment

PythonAnywhere

python3 --version
mkvirtualenv django3 --python=/usr/bin/python3.7
workon django3
pip install django
python3 -m django --version
cd ~/djProjects
django-admin startproject mysite
vim ~/djProjects/mysite/mysite/settings.py
"""/ upate ALLOWED_HOSTS
ALLOWED_HOSTS = ['*']
"""

cd ~/djProjects/mysite
python manage.py check
cd ~/djProjects
git init

# after create an empty ropo on github:
git remote add origin git@github.com:sheldonldev/djProjects_onPyAnyw.git
git add .
git commit -a

ssh-keygen -t rsa -C my_email@domain.com
cat ~/.ssh/id_rsa.pub

git push --set-upstream origin master
cd $hub/mysite_test
git clone git@github.com:sheldonldev/djProjects_onPyAnyw.git
pip freeze -> requirements.txt
git add .
git commit -a
git push

Heroku & pgAdmin (not usable in GFW)