Skip to content

Paula-Kli/myHPI

 
 

Repository files navigation

myHPI

This tool is used to manage the student representative website at https://myhpi.de (not live yet). It is a CMS based on Wagtail/Django and adds several functionalities like polls.

Development setup

To set up a development version on your local machine, you need to execute the following steps:

  1. Check out repository and cd to it
  2. Set up a virtualenv for the project with Python >=3.8 and activate it
  3. Install poetry (if not already installed): curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/install-poetry.py | python -
  4. Install dependencies with poetry install
  5. Create env file by copying the .env.example file to .env, e.g. cp .env.example .env (Notice that for some functionality like OIDC some settings must be changed)
  6. Migrate the database with python manage.py migrate
  7. Compile translations with python manage.py compilemessages (does not work on Windows, recommended to skip this step or see docs)
  8. Create a local superuser with python manage.py createsuperuser
  9. Start the development server with python manage.py runserver
  10. Open your web browser, visit http://localhost:8000/admin and log in with your user from step 8

Tests

Test the code with pytest.

Code style

We recommend installing a pre-commit hook with pre-commit install. That will (look at .pre-commit-config.yaml) before every commit

  • run autoflake with a couple of flags to remove unused imports,
  • run isort . to sort imports,
  • run black . to format the code. You can also check out the IDE integration

If 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.

About

Django/Wagtail page serving myhpi.de

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • SCSS 70.6%
  • Python 20.9%
  • HTML 4.2%
  • JavaScript 2.9%
  • CSS 1.3%
  • Shell 0.1%