Files
eumi_v4/Z_comenzi.txt
T

49 lines
1.4 KiB
Plaintext

### verificare versiune python, trebuie să fie cel puțin versiunea 3.12.2
$ python3 --version
### se instalează mediul virtual, dacă e nevoie
$ sudo apt install python3-venv
### se activează mediul virtual și se ințializează proiectul
$ python3 -m venv .venv
$ source .venv/bin/activate
(.venv) $ python3 -m pip install django~=6.1 psycopg2-binary==2.9.12
(.venv) $ django-admin startproject eumi__v4_project .
(.venv) $ python3 manage.py runserver
(.venv) $ pip freeze > requirements.txt
$ deactivate
$ git config --global user.name "CataX"
$ git config --global user.email "catalin@x3c.ro"
$ git config --global init.defaultBranch main
$ git init
$ git status
$ git add .
$ git commit -m "conf_initial"
$ docker compose up -d
docker compose exec web python manage.py migrate
$ docker compose exec web python manage.py createsuperuser
docker compose exec web python manage.py startapp users
docker compose exec web python manage.py startapp equipment
docker compose exec web python manage.py startapp interventions
sudo chown -R $USER: .
docker compose exec web python manage.py makemigrations users
docker compose exec web python manage.py migrate
docker compose exec web python -m pip install django-simple-history
docker compose exec web python manage.py makemigrations
docker compose exec web python manage.py migrate
docker compose exec web python manage.py makemigrations equipment
docker compose exec web python manage.py migrate