python3 -m ensurepip
pip install -r requirements.txt
pip-review --local --interactive
python3 -m venv .venv
source .venv/bin/activate
python -m pip install django
django-admin startproject nom_projet
python manage.py runserver
python manage.py startapp nom_sous_projet
# python -m pip install mysql-connector-python python -m pip install pymysql autocomplete fonctionne pas avec django 4, ca prends la version dev: python -m pip install django-autocomplete-light pip install -e git+https://github.com/yourlabs/django-autocomplete-light.git#egg=django-autocomplete-light python -m pip install django-addanother python -m pip install django-crispy-forms python -m pip install chartjs python -m pip install python-dateutil python -m pip install django-debug-toolbar
Add this in in project\init.py
import pymysql pymysql.install_as_MySQLdb()
python manage.py makemigrations
create DB
python manage.py sqlmigrate budgetdb 0001 python manage.py migrate
You'll need rights to create and use a test DB
python manage.py test nom_sous_projet
python manage.py createsuperuser
./manage.py test
gunicorn web_budget.wsgi:application --bind 0.0.0.0:8000
cd /mnt/cache/cache_only/working/github/budget docker build --build-arg GIT_COMMIT=$(git rev-parse HEAD) --build-arg BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ') -t web_budget:latest .
root@Tower:/mnt/cache/cache_only/working/github/budget# docker run --env-file web_budget/.env -p 8005:8005 --name web_budget web_budget:latest
root@Tower:/mnt/cache/cache_only/working/github/budget# docker tag web_budget:latest mathieugfortin/web_budget:latest root@Tower:/mnt/cache/cache_only/working/github/budget# docker login username: password: root@Tower:/mnt/cache/cache_only/working/github/budget# docker push mathieugfortin/web_budget:latest