commit
a65540aa06
4 changed files with 14 additions and 2 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,5 +1,6 @@
|
|||
# Byte-compiled / optimized / DLL files
|
||||
__pycache__/
|
||||
*.pyc
|
||||
|
||||
# C extensions
|
||||
*.so
|
||||
|
@ -53,6 +54,7 @@ target/
|
|||
|
||||
# PyCharm
|
||||
.idea/
|
||||
.vscode/
|
||||
|
||||
# ConfigFile
|
||||
app/config.py
|
||||
|
|
10
README.md
10
README.md
|
@ -5,3 +5,13 @@ Haldis is your friendly neighbourhood servant. He exists so lazy fucks like you
|
|||
Start an order and let people add items with a simple mouse-click!
|
||||
No more calculating prices and making lists!
|
||||
Be lazier today!
|
||||
|
||||
Local hosting steps
|
||||
===================
|
||||
0. This is a Python 3 project so make sure to use python 3 and pip3 everywhere
|
||||
1. Run `pip install -r requirements.txt`
|
||||
2. Copy `config.example.py` to `config.py` and find out some valid values for `ZEUS_KEY` and `ZEUS_SECRET` (try asking an admin)
|
||||
3. Copy the python files from `database/` to `app/` (yes, it's sad, I know)
|
||||
4. Run `python database.py` in `app/` (if you want to fill the DB with sample data be sure to answer `Y` to `Do you still want to add something?`)
|
||||
5. Run `rm -f add_admins.py* add_oceans_garden.py* add_simpizza.py* create_database.py*` in `app/`
|
||||
6. Run `python haldis.py runserver`
|
||||
|
|
|
@ -25,7 +25,7 @@ def add_all():
|
|||
|
||||
|
||||
def recreate_from_scratch():
|
||||
confirmation = "Are you very very sure? (Will delete previous entry's!) (y/N) "
|
||||
confirmation = "Are you very very sure? (Will delete previous entries!) (y/N) "
|
||||
check = "I acknowledge any repercussions!"
|
||||
if input(confirmation) in yes and input("Type: '{}' ".format(check)) == check:
|
||||
print("Resetting the database!")
|
||||
|
|
|
@ -78,7 +78,7 @@
|
|||
</table>
|
||||
</div>
|
||||
<div class="col-md-push-2 col-md-4 darker" id="items-ordered">
|
||||
<h3>Ordered products:</h3>
|
||||
<h3>Ordered products: {{ order.items.count() }}</h3>
|
||||
{% for key, value in order.group_by_product().items() -%}
|
||||
<div class="product">
|
||||
{{ key }}: {{ value["count"] }}
|
||||
|
|
Loading…
Reference in a new issue