I am a *bit* sorry for this commit, because ideally this would've been
folded into 6d50b1c2c7 and whatever the
source of the other "conflict" was.
However, as the things have been merged in a batch, I can't do much more
than this.
It was found during testing that some user agents cache aggressively
even between switches of the UI language. To properly indicate that the
pages actually depend on that information, we add the correct Vary
header.
Fixes#106.
Found in production. Yes really. Due to some borked LXC integration, my
snikket host reports
```
MemTotal: 9007199254740991 kB
MemFree: 9007199254690591 kB
MemAvailable: 9007199254690591 kB
```
That is more than 1024 TiB, so it tries to go further up in the scale,
which then causes a Guru Meditation because of the uncaught IndexError.
Previously, some kinds of errors would throw nice and fun cascades
of exceptions.
We now have a nice, clean error page for 500 and 503 (backend
connectivity) errors which includes minimal debugging information
for productive setups and a traceback for development setups.
In any case, the full exception is logged to the log with an error
ID which is printed on the error page.
- Avoid fighting import cycles using a factory function
- Collapse useless subpackages into simple modules
- Move flask plugins / infrastructure in own module
- Refactor how blueprints are used to localize information about
URL routing to app factory