This tool is used to manage the student representative website at https://myhpi.de. It is a CMS based on Wagtail/Django and adds several functionalities like polls.
For a quick start, use the dev container, e.g. by installing the Dev Containers extension in Visual Studio Code or using the built-in feature in JetBrains IDEs. This automatically installs all dependencies in a container. After starting the container, setup your local data by following the Manual Setup from step 9 (creating a superuser).
To set up a development version on your local machine, you need to execute the following steps:
python3 -m venv venv
and source venv/bin/activate
)curl -sSL https://install.python-poetry.org/ | python -
poetry install
.env.example
file to .env
, e.g. cp .env.example .env
(Notice that for some functionality like OIDC some settings must be changed)python manage.py migrate
python tools/install_bootstrap.py
python manage.py compilemessages
(does not work on Windows, recommended to skip this step or see docs)python manage.py create_test_data
python manage.py createsuperuser
python manage.py runserver
http://localhost:8000/admin
and log in with the user you just createdTest the code with python manage.py test myhpi.tests
.
We recommend installing a pre-commit hook with pre-commit install
. That will (look at .pre-commit-config.yaml
) before every commit
autoflake
with a couple of flags to remove unused imports,isort .
to sort imports,black .
to format the code. You can also check out the IDE integrationIf you want to do that manually, run pre-commit run --all-files
. Next to that, we also run pylint myhpi
to check for semantic issues in the code.
python manage.py makemessages -l de -i venv
.db.sqlite3