diff --git a/django/Dockerfile b/django/Dockerfile index 5f81b1fb4be4684f55231531385096660d965cd6..c15f073be5a3d3b90a1fbaa2ba9a63b7c70ac9fb 100644 --- a/django/Dockerfile +++ b/django/Dockerfile @@ -10,7 +10,7 @@ RUN apt-getq update && apt-getq install \ python-mysqldb python3-crypto gunicorn3 python3-redis python-mysqldb \ python3-crypto python3-natsort python3-aiohttp python3-aioredis supervisor \ python3-ipy python3-django-taggit python3-iso8601 python3-robot-detection \ - python3-sqlparse + python3-sqlparse python3-django-extensions python3-pydotplus COPY requirements.txt /tmp/ RUN cd /tmp && pip3 install -r requirements.txt && rm requirements.txt diff --git a/django/config/settings.py b/django/config/settings.py index 80f9e0425cd9592ef3f0c6cea637b885d5d5e097..f9fb05e9e5fa3f2ec0ea51523ddde9a9938dbcd7 100644 --- a/django/config/settings.py +++ b/django/config/settings.py @@ -115,6 +115,7 @@ THIRD_PARTY_APPS = [ 'allauth.socialaccount', 'allauth.socialaccount.providers.gitlab', 'taggit', + 'django_extensions', ] LOCAL_APPS = [ 'main', diff --git a/django/docs/generate_models_png.sh b/django/docs/generate_models_png.sh new file mode 100644 index 0000000000000000000000000000000000000000..b6007e1e7c87b0b9dd6125c927c82c96c72df1c6 --- /dev/null +++ b/django/docs/generate_models_png.sh @@ -0,0 +1,6 @@ +#! /bin/bash + +# TODO: the command should be placed in the Makefile or an official doc. +# It should be ran in the django container. +# cf https://django-extensions.readthedocs.io/en/latest/graph_models.html +python3 ./manage.py graph_models --all-applications --group-models --output allgo_model.png