* /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>
* Fixes#896
sidebar_table_layout switches to flex column layout
remove all 'float' buttons, replace them with nice flexboxes.
bill_table needs a flex-basis because with a very small width, it has a 0 height. I don't really know why, but adding a flex-basis: auto shows it.
* ensure new bill is on top of pagination
Currently translated at 100.0% (264 of 264 strings)
Co-authored-by: Glandos <bugs-github@antipoul.fr>
Translate-URL: https://hosted.weblate.org/projects/i-hate-money/i-hate-money/fr/
Translation: I Hate Money/I Hate Money
Co-authored-by: Glandos <bugs-github@antipoul.fr>
Fixes#875
Original showcase images are kept in another directory, and compressed
in webp in the distributed directory.
Since they won't change so much, let's keep them in git.
The style for top and bottom pagination was different, and the top part
was confusing.
Also translate bottom pagination text.
Co-authored-by: Baptiste Jonglez <git@bitsofnetworks.org>
* Update changelog.
Based on the work done in #570 and #834 by @Natim and @Glandos.
* Update contributing.rst release instructions.
* Update documentation configuration.
* Update translations
* Update translation strings
* Preparing release 5.0.0
* Back to development: 5.0.1
Currently translated at 26.9% (71 of 263 strings)
Co-authored-by: a-g-rao <athrigrao@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/i-hate-money/i-hate-money/kn/
Translation: I Hate Money/I Hate Money
Co-authored-by: a-g-rao <athrigrao@gmail.com>
* Make multiple currency optional
Fixes#848
A description is provided in project settings to make the feature self explanatory.
* I forgot the description.
Let's update translation altogether.
* black format
* Translated using Weblate (Turkish)
Currently translated at 100.0% (262 of 262 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
* Translated using Weblate (Kannada)
Currently translated at 22.8% (60 of 263 strings)
Co-authored-by: a-g-rao <athrigrao@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/i-hate-money/i-hate-money/kn/
Translation: I Hate Money/I Hate Money
Co-authored-by: Oğuz Ersen <oguzersen@protonmail.com>
Co-authored-by: a-g-rao <athrigrao@gmail.com>
Currently translated at 18.9% (49 of 258 strings)
Co-authored-by: a-g-rao <athrigrao@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/i-hate-money/i-hate-money/kn/
Translation: I Hate Money/I Hate Money
Co-authored-by: a-g-rao <athrigrao@gmail.com>
The new support for currency broke backwards compatibility on the API:
$ curl -X POST $URL/api/projects -d 'name=yay&id=yay&password=yay&contact_email=yay@notmyidea.org'
{"default_currency": ["This field is required."]}
This is a case we were not testing (will be fixed in subsequent commits)
To fix this, simply set default_currency to XXX by default.
Fix#780
This a breaking change, the API for authentication is different, as it now requires `project_id`. Token is generated with only the project_id (so it's shorter than before), and signature is done by mixing password with secret key. Thus, it expires on every project code change.
This mock was already applied to all tests, because it was done statically
in the TestCurrencyConverter class definition. But it was really not
clear that it's applied everywhere.
Moving this to the setUp() function makes it much clearer.
Also, remove useless redefinition in other tests.
Fix#803
On some systems, there is no configured local timezone, so LOCALTZ is
a fallback object, that don't fit use case for flask-babel.
Detect this and use 'UTC' instead
Currently, we don't display the current language in the list. This is
confusing because the list changes when switching language.
Now we always display the full list, and we highlight the current
language.
* add the event listener only once, instead of every time the form is clicked
* use a standard button by default, so that the second state with a
"danger" button is more visible
* reset confirmation button to original state when losing focus
Co-authored-by: Glandos <bugs-github@antipoul.fr>
This is the same idea as deleting a project: deleting history is also a
major destructive action. We reuse the same form as for project deletion
to ask for the private code and provide CSRF validation.
Most of the tests are using a separate database, but we have a few tests
that are loading default values and are writing to /tmp/ihatemoney.db.
This is annoying because it's also the database used for development:
running the test suite breaks the dev database.
To fix this, always use a separate testing database to avoid interference.