Show Menu
Cheatography

Configuración de django, python

pip3

sudo apt install python­3-pip
pip3 --version

virtualenv

sudo apt-get install python­-vi­rtu­alenv virtualenv
pip3 install virtualenv
virtualenv -p python3 envgv1
source bin/ac­tivate
deactivate

django

pip3 install -e django-dev
django­-admin --version
django­-admin startp­roject proyect
python manage.py create­sup­eruser
python manage.py startapp name
python manage.py runserver
pip install -r requir­eme­nts.txt
python manage.py shell
python manage.py collec­static
 

django­-da­tabase

python manage.py makemi­gra­tions
python manage.py migrate

django­-le­aflet

pip3 install django­-le­aflet
python manage.py ogrinspect rute.shp --mapping --multi --srid­=4326

bower and collec­static

pip3 install django­-bower
rpm install -g bower
python manage.py bower install
pip install django­-st­ati­cfiles
python manage.py collec­tstatic

grappelli

pip install django­-gr­appelli
pip install django­-gr­app­ell­i-e­xtras

database django

pip install psycopg2
pip install psycop­g2-­binary
 

git

git init
git clone /path/­rep­ository
git clone userna­me@­hos­t:/­pat­h/r­epo­sitory
git add filename
git add
git commit -m "­mes­sag­e"
git push origin master
git remote add origin server
git checkout -b rama (create rama)
git checkout master
git branch -d rama (delete rama)
git push origin rama
git pull
git merge rama
git diff source­_rama target­_rama
git tag 1.0.0 1b2e1
git log
git checkout -- filename
git fetch origin
git reset --hard origin­/master
gitk
git config color.ui true
git config format.preety oneline
git add -i
   

Help Us Go Positive!

We offset our carbon usage with Ecologi. Click the link below to help us!

We offset our carbon footprint via Ecologi
 

Comments

No comments yet. Add yours below!

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.

          Related Cheat Sheets

          Python Cheat Sheet