Haldis web application code, official upstream is at https://github.com/ZeusWPI/Haldis/ — [Menus](https://git.zeus.gent/haldis/menus)
Find a file
2020-01-26 15:09:22 +01:00
app Add typing in HLDS code, change price to int 2020-01-26 15:09:22 +01:00
data Add translation table from legacy to HLDS IDs 2020-01-25 22:13:57 +01:00
etc Fix HLDS header in Vim support 2020-01-24 22:03:15 +01:00
.editorconfig Add editorconfig for indentation uniformity 2020-01-24 15:23:10 +01:00
.gitignore Merge branch 'master' into hlds 2020-01-22 20:40:28 +01:00
.pylintrc Increase line length limit to 100 2019-09-12 20:53:26 +02:00
.python-version add python version file 2019-09-03 14:05:28 +02:00
first-setup.sh remove old migrations, run via manager 2019-09-03 13:56:13 +02:00
LICENSE This is really going to hurt 2015-03-31 20:15:22 +02:00
parse_hlds.py Fix issues reported by pylint 2020-01-26 01:50:30 +01:00
populate-db.sh Fix db init script 2019-09-11 04:10:24 +02:00
README.md Added a note at the end of the setup section of README to tell the user to use localhost instead of 127.0.0.1 2019-11-20 18:20:11 +01:00
requirements.in Update requirements 2020-01-24 15:13:28 +01:00
requirements.txt Update requirements 2020-01-24 15:13:28 +01:00
tests.md Add file listing tests to be run 2019-09-08 20:59:05 +02:00

Haldis

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.

./first-setup.sh

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

./populate-db.sh

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 127.0.0.1 if you want to be able to login.

Development

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.

Authors

  • Feliciaan De Palmenaer - Initial work - Github