* Support WTForms 3
* default value to None for WTForm backward compatibility
* switch back to empty string as default
WTForm backward compatibility needs that
* format
* get weight sum along with bills to scale
otherwise, we need to get the weight sum for each displayed bill.
Here, we are much more scalable
* add test
* format
* remove unused import
* oops, restore pagination to 100
* add comments
* format
* rename method to make it clearer
And also, make it static, since it doesn't rely on instance.
* improve comments and naming
* improve naming
* missing article
* Change the way we import datetime
This makes it easier to use datetime.date later.
* Display monthly statistics for the range of months where the project was active
Currently, we display a hard-coded "one year" range of monthly statistics
starting from today. This generally is not the intended behaviour: for
instance, on an archived project, the bills might all be older than one
year, so the table only displays months without any operation.
Instead, display all months between the first and last bills. There might
be empty months in the middle, but that's intended, because we want all
months to be consecutive.
If there are no bills, simply display an empty table.
Co-authored-by: Baptiste Jonglez <git@bitsofnetworks.org>
* Translated using Weblate (German)
Currently translated at 100.0% (265 of 265 strings)
Co-authored-by: Jannik Lang <jannik.lang@posteo.de>
Translate-URL: https://hosted.weblate.org/projects/i-hate-money/i-hate-money/de/
Translation: I Hate Money/I Hate Money
* Translated using Weblate (German)
Currently translated at 100.0% (265 of 265 strings)
Co-authored-by: Christian H <sunrisechain@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/i-hate-money/i-hate-money/de/
Translation: I Hate Money/I Hate Money
* Translated using Weblate (German)
Currently translated at 100.0% (265 of 265 strings)
Co-authored-by: Jannik Lang <jannik.lang@posteo.de>
Translate-URL: https://hosted.weblate.org/projects/i-hate-money/i-hate-money/de/
Translation: I Hate Money/I Hate Money
Co-authored-by: Jannik Lang <jannik.lang@posteo.de>
Co-authored-by: Christian H <sunrisechain@gmail.com>
* Translated using Weblate (French)
Currently translated at 100.0% (265 of 265 strings)
Co-authored-by: Alexis Metaireau <alexis@notmyidea.org>
Translate-URL: https://hosted.weblate.org/projects/i-hate-money/i-hate-money/fr/
Translation: I Hate Money/I Hate Money
* Translated using Weblate (Italian)
Currently translated at 75.0% (199 of 265 strings)
Co-authored-by: Paolo Campetto <fbok61hw@anonaddy.me>
Translate-URL: https://hosted.weblate.org/projects/i-hate-money/i-hate-money/it/
Translation: I Hate Money/I Hate Money
Co-authored-by: Alexis Metaireau <alexis@notmyidea.org>
Co-authored-by: Paolo Campetto <fbok61hw@anonaddy.me>
* /healthcheck endpoint usefull for monitoring, ci test also uses this
* customizable PORT with environment variable
* customizable PUID/PGID, reduce attack surface and allow better integration in rootless environments
* size optimization
* update to python 3.10
* add postgresql compatibility
* PUID/PGID default as root to not break current user environments
* Do not require a captcha when using the API
This was trickier than expected, due to some side effects : when the
captcha is set to `True` via configuration, it doesn't change the
behavior directly of the ProjectForm class, but does so only when the
project form is used in the `web.py` module.
So, when just using the API (and not using the web.py module, for
instance during tests — manual or functional), no problem was shown,
and everything was working properly.
But at soon as somebody sees the "/" endpoint, the captcha was
required, by both the API and the `web.py` module.
This fixes it by adding a way to bypass the captcha with a new
`bypass_captcha` property on the form.
Prior to this commit, things were done by activating or deactivating a
"captcha" property on the class on-the-fly, which caused side-effects.
This is now using subclasses, which makes the code simpler to
understand, and less prone to side-effects.
Thanks @zorun for the idea.
Currently translated at 95.0% (252 of 265 strings)
Co-authored-by: whenwesober <naomi16i_1298q@cikuh.com>
Translate-URL: https://hosted.weblate.org/projects/i-hate-money/i-hate-money/id/
Translation: I Hate Money/I Hate Money
Co-authored-by: whenwesober <naomi16i_1298q@cikuh.com>
Currently translated at 100.0% (265 of 265 strings)
Co-authored-by: Oğuz Ersen <oguzersen@protonmail.com>
Translate-URL: https://hosted.weblate.org/projects/i-hate-money/i-hate-money/tr/
Translation: I Hate Money/I Hate Money
Co-authored-by: Oğuz Ersen <oguzersen@protonmail.com>