PyMySQL is more difficult to install since its version 0.9 since it now depends
on *cryptography* lib, which in turns depends on OpenSSL and Python dev files.
See https://github.com/PyMySQL/PyMySQL/issues/697
- Use exec to run gunicorn and avoid creating a new process.
- Add the possibility to pass any additional parameters to
gunicorn.
- Use only one gunicorn worker by default as the usual way to
scale the app in production would be to use the scale command
of the cluster scheduler. Additional workers could still be
added by passing the "-w" gunicorn parameter to docker run.
Clearer data structure, and simpler template
This commit has a side effect: sidebar now hides disabled members.
IMHO, the disabled members should either be hidden or shown consistently between
sidebar and central table. Previous status was: shown in sidebar (if balance ≠
0) and hidden in central table.
This fix a regression from #316 (scrollbar was displayed all the time).
Note that the padding-bottom value is totally empiric, but proved OK on my Fx
and Chrome instances + some responsive tests. There might be finer solutions,
feel free :-).
For this I had to create an Jinja2 explicit environment, so I put a
function in `ihatemoney.utils.create_jinja2_env(strict_rendering=False)`.
When using this environment and if `strict_rendering` is activated,
templates using undefined variables will now error out rather than
failing silently.
The script was relying on the presence of an environment variable, which
is only set when the virtualenv is activated. But a virtualenv does not
have to be activated to work (it's possible to call the python command
directly).
This fixes it by relying on `sys.executable` which should be correct at
all times.
Fixes#306
* Rename manage.ConfigTemplate → manage.GenerateConfig
To be consistent with the CLI name: `generate-config`.
* Add tests for manage.py commands
* Run tests from pip-installed package
To be able to detect packaging-related issues on test runs.
refs #305
The script was relying on the presence of an environment variable, which
is only set when the virtualenv is activated. But a virtualenv does not
have to be activated to work (it's possible to call the python command
directly).
This fixes it by relying on `sys.executable` which should be correct at
all times.
Fixes#306
I've also renamed the templates to *.j2 in order to make things clearer
to others. Having extensions with the name of the locale doesn't seem to
be a good practice, and would need us to add the locales in the MANIFEST
file each time we add one.
Fix#305
* Enable basic auth passthrough for API
Added the couple of apache configuration lines necessary to get the basic authentication working for the API.
* Revert the addition of "AuthType Basic"
Did some more testing on my server here and I totally agree, don't need "AuthType Basic".