Haldis web application code, official upstream is at https://github.com/ZeusWPI/Haldis/ — [Menus](https://git.zeus.gent/haldis/menus)
Go to file
redfast00 cdca5646ef
Merge pull request #204 from Happilands/patch-1
Add robots.txt file
2023-04-22 17:52:17 +02:00
app Merge branch 'master' into patch-1 2023-04-19 19:14:54 +02:00
etc HLDS: change :: to double space and require it 2021-07-24 17:51:25 +02:00
.editorconfig Fix themes 2020-07-18 03:29:27 +02:00
.gitignore Migrate menus to separate repo 2020-09-18 19:54:53 +02:00
.pylintrc Fix pylint on everything 2022-04-19 23:20:03 +02:00
.python-version Update to use the exact server version 2022-04-19 20:10:22 +02:00
.tool-versions .tool-versions toegevoegd 2022-10-27 19:15:29 +02:00
LICENSE Change to AGPL 2020-08-26 19:10:31 +02:00
README.md Change HALDIS_ADMIN_USERS configuration key to the one actually used 2022-05-20 19:32:59 +02:00
first-setup.sh Merge pull request #178 from fbegyn/f-portable-shell-scripts 2022-04-19 20:20:59 +02:00
parse_hlds.sh make shell scripts portable 2022-04-19 19:17:27 +02:00
populate-db.sh Make sure to stamp database at latest revision after setup 2022-05-20 21:59:51 +02:00
pylint-requirement.txt Add requirements for running pylint 2022-04-19 22:05:38 +02:00
requirements.in Add glitchtip 2022-10-27 19:38:46 +02:00
requirements.txt Add glitchtip 2022-10-27 19:38:46 +02:00
tests.md Add file listing tests to be run 2019-09-08 20:59:05 +02:00



chat mattermost Website Mozilla HTTP Observatory Grade

GitHub commit activity

Haldis is your friendly neighbourhood servant. He exists so lazy fucks like you and me don't need to keep tabs of who is ordering what from where. Start an order and let people add items with a simple mouse-click! No more calculating prices and making lists! Be lazier today!

Local setup

There is a special script to get started with the project. Just run it in the root of the project. Note: this script might require you to install a certain python version, you can do this using your favorite tool e.g. pyenv


This will create a virtual environment, install the necessary dependencies and will give you the option to seed the database.

If you are using a database other then sqlite you will first need to configure the correct URI to the database in the generated 'config.py' file. Afterwards upgrade the database to the latest version using

cd app
python3 app.py db upgrade

You can now still seed the database by running, note that you might want to put your name in the HALDIS_ADMINS in app/config.py


in the root folder of the project.

Activate the virtual environment using

source venv/bin/activate

Finally run the webserver with

python3 app/app.py runserver

Make sure to use localhost instead of if you want to be able to login.


Changing the database

  1. Update models located in 'app/models.py'
  2. Run python app/app.py db migrate to create a new migration.
  3. Apply the changes to the database using python app/app.py db upgrade

Adding dependencies/libraries

  1. Add new dependency to the requirements.in file
  2. Run pip-compile to freeze the dependency into the requirements.txt file together with its own deps
  3. Run pip-sync to download frozen deps

Updating dependencies

Run pip-compile --upgrade

For more information about managing the dependencies see jazzband/pip-tools: A set of tools to keep your pinned Python dependencies fresh.


To prepare the application in a production environment, follow the same steps as for Local setup up to and including ./populate-db.sh.

Set DEBUG to False in app/config.py.

See Flask's deployment documentation.

Set the server's Python interpreter to /path/to/haldis/venv/bin/python. Doing source venv/bin/activate is not necessary when that binary is used.