Commit graph

1128 commits

Author SHA1 Message Date
Baptiste Jonglez
31f110a2f5 Release 5.2.0 2022-04-07 21:26:08 +02:00
Baptiste Jonglez
70790386cc Prepare changelog for 5.2.0 release 2022-04-07 21:23:25 +02:00
Glandos
5f4f69bc6c
Convert MAIL_DEFAULT_SENDER to a string (#1007)
Fixes #1005
2022-04-07 21:15:48 +02:00
Baptiste Jonglez
0dede02133 Add missing __init__.py that may explain why CI fails 2022-04-03 00:28:08 +02:00
Glandos
eaf059fe91
Hide "each" amount when there's only one recipient (#1008)
Fixes #1002
2022-03-24 17:31:50 +01:00
dependabot[bot]
b89367a3b1 Update flask-talisman requirement from <1,>=0.8 to >=0.8,<2
Updates the requirements on [flask-talisman](https://github.com/wntrblm/flask-talisman) to permit the latest version.
- [Release notes](https://github.com/wntrblm/flask-talisman/releases)
- [Commits](https://github.com/wntrblm/flask-talisman/compare/v0.8.0...v1.0.0)

---
updated-dependencies:
- dependency-name: flask-talisman
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-20 14:52:22 +01:00
Weblate (bot)
22ac13a2e3
Translated using Weblate (Portuguese (Brazil)) (#1004)
Currently translated at 82.6% (219 of 265 strings)

Co-authored-by: Vinícius A. L. Souza <me@viniciusals.com>
Translate-URL: https://hosted.weblate.org/projects/i-hate-money/i-hate-money/pt_BR/
Translation: I Hate Money/I Hate Money

Co-authored-by: Vinícius A. L. Souza <me@viniciusals.com>
2022-03-13 19:45:46 +01:00
9b1dfa38f3 Document cookies settings when using local Docker.
Secure Session Cookies must be disabled when running things
locally and using localhost.

Fix #979.
2022-03-08 22:28:28 +01:00
Nicolas Ferrari
5cb53f1fce
Cloud Providers list (#998)
* Add Cloud Providers
* Link to Cloud Providers
2022-03-07 17:21:56 +01:00
Glandos
a71f154354 Purge project history on deletion 2022-03-05 17:12:59 +01:00
Allan Nordhøy
09e583b49e Translated using Weblate (Norwegian Bokmål)
Currently translated at 75.0% (199 of 265 strings)

Co-authored-by: Allan Nordhøy <epost@anotheragency.no>
Translate-URL: https://hosted.weblate.org/projects/i-hate-money/i-hate-money/nb_NO/
Translation: I Hate Money/I Hate Money
2022-02-28 22:28:45 +01:00
Glandos
e355894cee
Check for too high values (#989)
* check for too high values

see https://github.com/python-babel/babel/issues/821

fix #957

* black & isort

* add API test
2022-02-02 10:09:49 +01:00
Glandos
1bea93f8a5 upgrade sqlalchemy-continuum
1.3.10 is needed to remove the patch
1.3.12 is needed for SQLAlchemy 1.4
2022-02-01 23:02:49 +01:00
Gianluca De Cola
a14c7c5aaf Add a tooltip to advertize the computation trick on bills. 2022-01-31 22:07:47 +01:00
Glandos
07e1eac0a9
Null amount validator was broken (#990) 2022-01-30 16:33:18 +01:00
Peter Maksymowsky
a5452ccee5
Display admin email in error message for password reminder (#965)
Co-authored-by: Glandos <bugs-github@antipoul.fr>
2022-01-30 15:33:54 +01:00
7c3ced06f8
Some small cleanups (#976)
Co-authored-by: Glandos <bugs-github@antipoul.fr>
2022-01-30 15:26:22 +01:00
Weblate (bot)
ed6676485a
Translations update from Hosted Weblate (#987)
Co-authored-by: yzqzss <yzqzss@yandex.com>
2022-01-25 22:34:00 +01:00
Glandos
1a90e4cdd8
Fix broken captcha validation when field is empty and we use WTForms 3 (#988) 2022-01-25 22:26:56 +01:00
dependabot[bot]
d324edfc1a
Bump sphinx from 4.3.2 to 4.4.0 (#982)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-25 21:50:26 +01:00
Weblate (bot)
8fe7bbdf4c
Translated using Weblate (Polish) (#983)
Currently translated at 80.3% (213 of 265 strings)

Co-authored-by: Piotr <promantix@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/i-hate-money/i-hate-money/pl/
Translation: I Hate Money/I Hate Money

Co-authored-by: Piotr <promantix@gmail.com>
2022-01-23 19:43:45 +01:00
Glandos
40ce32d9fa
Support WTForms 3 (#916)
* Support WTForms 3

* default value to None for WTForm backward compatibility

* switch back to empty string as default

WTForm backward compatibility needs that

* format
2022-01-23 19:43:32 +01:00
Glandos
023ec71536
[Performance] Get weight sum along with bills to scale (#949)
* 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
2022-01-22 00:13:07 +01:00
zorun
c8cbe43ee2
Display monthly statistics for the range of months where the project was active (#885)
* 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>
2022-01-18 14:32:43 +01:00
Baptiste Jonglez
7cb43f58c0 CI: check compatibility with Python 3.6 using vermin 2022-01-14 19:45:02 +01:00
Baptiste Jonglez
0c8b8e9374 Remove old python 2 compatibility code 2022-01-14 19:45:02 +01:00
Salamandar
6519223b45
Fix : use url_for in showcase template. (#974) 2021-12-22 19:25:55 +01:00
Youe Graillot
747824a298
CSV bills import (cospend compatible) (#951)
* proper import form (fix messy errors)
* csv compatible import
* cospend compatible import
* localization (best effort)
* refactoring
* revert localization (best effort)
* import return 400 on error
* fix Person.query.get_by_ids calls
* Bill explicit init parameters
* fix tests
* refacto tests with self.get_project
* separate import tests
* fix tests
* csv import test case
* fix import csv parsing
* revert DestructiveActionProjectForm renaming
* fix csv import test
* fix error redirection on import
* fix lint
* import file input type hint
* various fixes from review

Co-authored-by: Youe Graillot <youe.graillot@gmail.com>
2021-12-22 00:00:34 +01:00
Glandos
8b6a2afc63
Check that language is in the supported list (#971) 2021-12-21 22:40:37 +01:00
dependabot[bot]
f4c5786597
Bump sphinx from 4.3.1 to 4.3.2 (#968)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-21 15:32:44 +01:00
Glandos
a0d13e4081
Top pagination and new bill button are sticky (#956) 2021-12-14 22:51:06 +01:00
Peter Maksymowsky
470c19fe4d
List supported currencies in API under api/currencies (#961)
* List supported currencies in API under api/currencies

* Added test for /currencies route
2021-12-13 23:25:25 +01:00
Weblate (bot)
915c832acc
Translations update from Hosted Weblate (#958)
Co-authored-by: Jannik Lang <jannik.lang@posteo.de>
Co-authored-by: Christian H <sunrisechain@gmail.com>
2021-12-03 23:33:06 +01:00
Glandos
b9fee9e886
Rework flash messages (#943) 2021-12-01 22:42:20 +01:00
bd116320e4
Use flask run rather than custom manage command (#952) 2021-11-30 11:51:14 +01:00
dependabot[bot]
b4a81967b8
Bump sphinx from 4.3.0 to 4.3.1 (#954)
Bumps [sphinx](https://github.com/sphinx-doc/sphinx) from 4.3.0 to 4.3.1.
- [Release notes](https://github.com/sphinx-doc/sphinx/releases)
- [Changelog](https://github.com/sphinx-doc/sphinx/blob/4.x/CHANGES)
- [Commits](https://github.com/sphinx-doc/sphinx/compare/v4.3.0...v4.3.1)

---
updated-dependencies:
- dependency-name: sphinx
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-30 11:50:48 +01:00
Weblate (bot)
58d8a24047
Translations update from Hosted Weblate (#953)
* 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>
2021-11-30 11:49:59 +01:00
Youe Graillot
db1379be34
Legal link fixes (#950)
* fix default legal link value in docker

* fix footer-right overflow
2021-11-28 18:45:45 +01:00
Weblate (bot)
d0a8668de6
Translations update from Hosted Weblate (#947)
* 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>
2021-11-26 09:02:53 +01:00
Glandos
521838ace4
small css cleanup by using bootstrap classes (#945) 2021-11-26 00:06:36 +01:00
Glandos
e929181128
Remove notification showing the id of the project after creation (#944) 2021-11-25 14:30:17 +01:00
Youe Graillot
acb2799575
Production ready docker (#919)
* /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
2021-11-25 08:23:23 +01:00
ef3944ccad
Send an email when the project is created via the API. (#938) 2021-11-25 00:49:17 +01:00
1698841f6d
Do not require a captcha when using the API (#931)
* 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.
2021-11-25 00:44:21 +01:00
Nikos Epping
05ac991a55
Allow clicking buttons behind messages div (#929) 2021-11-24 21:56:14 +01:00
68552a6034
Allow connecting to upper-case project IDs. (#934)
Fix #933.
2021-11-23 19:09:50 +01:00
Weblate (bot)
bd9ebd1d60
Translated using Weblate (Indonesian) (#936)
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>
2021-11-23 10:39:55 +01:00
2adc2bf0be
Check that project creation via the API doesn't required a captcha. (#926)
Fixes #922
2021-11-21 17:39:42 +01:00
beac10be0b
Always authentify projects using a lowercase ID. (#925)
Fixes #920
2021-11-21 17:13:26 +01:00
Glandos
4d6a5aaa27
add tests for python 3.10 (#921)
This also raises pytest and flask-cors version to work with python 3.10. Changes are non invasive.
2021-11-15 22:33:32 +01:00