This reverts commit ff0ea068de.
The next commit (Create a slug for old orders in the migration) will
change our strategy of writing code to handle the legacy slugless orders:
we will generate a slug for old orders.
Orders created before we introduced slugs don't have a slug. This commit
introduces code to work with them. Without these changes, the legacy
orders are not reachable any more, and trying to create a link for them,
crashes the page.
I wrote this commit because in my test environment I had a long-lived
order for testing purposes, and the home page crashed because the order
would show up in the list of Open Orders.
Remove main CSS from shop view page. Make it theme independent and
maximize contrast.
Improve spacing in "add item" list.
Refactor old term "showcase" to "shop_view" in code.
The comment says that mypy gives a "Missing return statement" but it
links to an issue on the mypy bug tracker about the same error message
reported after exhaustive enum matching. This is a completely different
situation, here the "Missing return statement" is warranted: this part
of the code is reachable so an explicit `return None` is wanted for this
function that returns an Optional.
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.
* 'master' of github.com:ZeusWPI/Foodbot:
Fixed bug for volunteering closes#44
Check if user is allowed to edit
Add paid indicator, fixes#19
spacing
Edit orders
Added phone number
Added alembic and flask-migrate to haldis