Haldis web application code, official upstream is at https://github.com/ZeusWPI/Haldis/ — [Menus](https://git.zeus.gent/haldis/menus)
Find a file
mcbloch d0863325a5
Restructuring the codebase!
But for real, it's a real shitstorm in there.
- Added context by making the init go through a function
  and not implicitly happen via imports
- Fixup all context and contextless function mixups
- splitup the models in sensible different files
- give the dump of view functions in views/__init__.py their own file
- add all routes via blueprints, not half of them
- move the slack notifications function and class to its own file,
    no idea what it was doing in a views file in the first place.
2019-08-28 03:46:04 +02:00
app Restructuring the codebase! 2019-08-28 03:46:04 +02:00
.gitignore add venv creation to script, add to readme and gitignore 2019-04-01 23:42:59 +02:00
first-setup.sh make setup script work on other debian - tiny css improvement 2019-05-31 01:07:01 +02:00
LICENSE This is really going to hurt 2015-03-31 20:15:22 +02:00
populate-db.sh use pip-tools for dependecy management, update setup script 2019-04-05 01:25:30 +02:00
README.md add media querries for side padding 2019-05-31 19:05:40 +02:00
requirements.in fix pip-tools dep 2019-04-05 01:29:48 +02:00
requirements.txt update urllib3 dependency; CVE-2019-11324 2019-04-19 21:50: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
python haldis.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

python app/haldis.py runserver

Development

Changing the database

  1. Update models located in 'app/models.py'
  2. Run python app/haldis.py db migrate to create a new migration.
  3. Apply the changes to the database using python app/haldis.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 it's 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.