Install graphviz:
sudo apt install graphviz
Install all python dependencies:
pip install -r requirements.txt
-
Check if Docker Desktop is running
-
Run
docker compose up --build --detach --remove-orphansto initialize the docker container (if you're using old docker, you might need to usedocker-composewith an hyphen) -
Navigate to
http://localhost:8000to check if everything is running smoothly -
Use the command
docker exec -it django shto open the command prompt inside the container you've just created!
Inside the docker container:
- Run
migrateto populate local database with required tables:
python manage.py migrate
- Create your
superuser:
python manage.py createsuperuser
- Start Django debug server:
python manage.py runserver
- Check if it works by accessing
localhost:8000in your browser.
Welcome to the Django!
localhost:8000/admin instead.
For a png file run:
python manage.py graph_models bibliotheque -o edr.png
For a svg file run:
python manage.py graph_models bibliotheque -o edr.svg