Open marcpage opened 2 years ago
How could I go about solving this?
Take a look at the referenced class in model.py.
We need a form in the gm section of restaurant.html that can submit the data needed to create that object in the database (maximum hours, notes). We need a new function in model.py to create a new instance of that class. We then have a new entry in scheduling.py that takes that form data and calls the function in model.py to create it.
To add the employee to the form in restaurant.html, you can now reference the variable employees
and have a <select>
popup to choose employee.
@QueTeddy I'm getting to the point where I will need this. Do you want to implement it or should I?
the app won't run.
What OS are you on and what issues are you seeing?
Ubuntu. Let me show you.
Do you have bash shell installed? I believe it is part of the standard install. The CI/PR build in GitHub also uses Ubuntu and it seems to work fine.
Also, is bash in your path? What happens if you type in bash --version and hit return? On my macOS machine I get:
bash --version GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin17) Copyright (C) 2007 Free Software Foundation, Inc.
If you get an error saying bash is not a command then it would appear you do not have bash.
If I type bash --version I get: GNU bash, version 5.0.17(1)-release (x86_64-pc-linux-gnu) Copyright (C) 2019 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software; you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
which means I have bash installed. If you could put me through the process of you running the app.
Here are the basics of what the pr_build.sh does:
Run
python3 -m venv /tmp/scheduling
source /tmp/scheduling/bin/activate
pip3 install -qr Requirements.txt
python3 src/scheduling.py --test
Validate Source Format
black src/*.py
pylint src/*.py
flake8 --max-line-length=100 src/*.py
See class UserLimits in model.py