/jango

Jango is a directory to learn and test Django.

Primary LanguageJavaScriptMIT LicenseMIT

Jango (Fett)

Robin Bigeard

XML page Orders page API page Admin page

Install Python3, Pip3 :

python3 -V
// Python 3.7.3
pip3 -V
// pip 19.0.3 from /usr/lib/python3.7/site-packages/pip (python 3.7)

Virtuel Environment

pip3 install virtualenv
python3 -m venv venv
source venv/bin/activate

Install Django

pip install django
// Python 3.7.3
python -m django --version
// 2.2

Create project Django

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

Heroku

Install Heroku

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

Comamnd Heroku

heroku run python manage.py migrate
heroku run bash -a app-jango
`$ server-heroku :` python manage.py migrate
`$ server-heroku :` python manage.py createsuperuser 

Database Command

python manage.py check
python manage.py makemigrations
python manage.py migrate
python manage.py createsuperuser --username=bigeard --email=robin.bigeard@gmail.com

Source

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