Robin Bigeard
python3 -V
// Python 3.7.3
pip3 -V
// pip 19.0.3 from /usr/lib/python3.7/site-packages/pip (python 3.7)
pip3 install virtualenv
python3 -m venv venv
source venv/bin/activate
pip install django
// Python 3.7.3
python -m django --version
// 2.2
Create project.
django-admin startproject jango
See all command.
cd jango
python manage.py
Run server.
python manage.py runserver
Create app.
python manage.py startapp orders
First install client heroku servives. https://www.heroku.com/
pip install gunicorn
add file Procfile
.
web: gunicorn jango.wsgi --log-file -
Install dj-database-url for connection to postgres directly by URL.
pip install dj-database-url
Install psycopg2
pip install psycopg2
Install whitenoise
pip install whitenoise
Create file requierements.txt for heroku, it references all pip installations.
pip freeze > requirements.txt
heroku run python manage.py migrate
heroku run bash -a app-jango
`$ server-heroku :` python manage.py migrate
`$ server-heroku :` python manage.py createsuperuser
python manage.py check
python manage.py makemigrations
python manage.py migrate
python manage.py createsuperuser --username=bigeard --email=robin.bigeard@gmail.com
https://docs.djangoproject.com/en/2.2/
https://www.geeksforgeeks.org/xml-parsing-python/ https://python-django.dev/page-xml-python-xpath
https://www.youtube.com/watch?v=263xt_4mBNc https://www.youtube.com/watch?v=eJ0sEUB3d1U https://www.youtube.com/watch?v=D6esTdOLXh4
https://devcenter.heroku.com/articles/getting-started-with-python