Compare commits

...

217 Commits

Author SHA1 Message Date
vabene1111
1bfe5bb6a0 Merge branch 'develop' 2024-08-20 12:21:11 +02:00
vabene1111
f6f6754669 removed validators library and improved url validation 2024-08-20 11:45:23 +02:00
vabene1111
752a25b1f8 fixed comma 2024-08-18 14:41:17 +02:00
vabene1111
8e8e4bb8bb added us_cup as base unit 2024-08-18 14:26:10 +02:00
vabene1111
06dc02d6b2 Merge pull request #3260 from yuekaim/patch-1
Update unit_conversion_helper.py
2024-08-18 14:24:17 +02:00
vabene1111
540daf2a38 fixed test 2024-08-18 14:20:09 +02:00
vabene1111
9e671d93cb added guest read only permission to keyword/api/space endpoint 2024-08-18 12:59:34 +02:00
Stefan van der Gevel
269be4e31a Translated using Weblate (Dutch)
Currently translated at 100.0% (569 of 569 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/nl/
2024-08-17 12:58:35 +00:00
Stefan van der Gevel
5969edc0b8 Translated using Weblate (Dutch)
Currently translated at 100.0% (569 of 569 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/nl/
2024-08-16 11:58:37 +00:00
Stefan van der Gevel
42176f42ed Translated using Weblate (Dutch)
Currently translated at 100.0% (488 of 488 strings)

Translation: Tandoor/Recipes Backend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-backend/nl/
2024-08-16 11:58:37 +00:00
cleo miao
8c8bb159ea Update unit_conversion_helper.py
added us cup as a volume measurement
2024-08-14 02:43:19 +02:00
vabene1111
b9cf29a0ec Merge pull request #3259 from TandoorRecipes/dependabot/pip/django-4.2.15
Bump django from 4.2.14 to 4.2.15
2024-08-13 13:04:44 +02:00
dependabot[bot]
5db9f33723 Bump django from 4.2.14 to 4.2.15
Bumps [django](https://github.com/django/django) from 4.2.14 to 4.2.15.
- [Commits](https://github.com/django/django/compare/4.2.14...4.2.15)

---
updated-dependencies:
- dependency-name: django
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-13 11:04:28 +00:00
vabene1111
1ba09cc119 Merge pull request #3248 from TandoorRecipes/dependabot/pip/aiohttp-3.10.2
Bump aiohttp from 3.10.0 to 3.10.2
2024-08-13 13:03:29 +02:00
dependabot[bot]
02bbe3fa13 Bump aiohttp from 3.10.0 to 3.10.2
Bumps [aiohttp](https://github.com/aio-libs/aiohttp) from 3.10.0 to 3.10.2.
- [Release notes](https://github.com/aio-libs/aiohttp/releases)
- [Changelog](https://github.com/aio-libs/aiohttp/blob/master/CHANGES.rst)
- [Commits](https://github.com/aio-libs/aiohttp/compare/v3.10.0...v3.10.2)

---
updated-dependencies:
- dependency-name: aiohttp
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-09 16:52:46 +00:00
vabene1111
0c77ca91c1 updated translations 2024-08-01 15:04:19 +02:00
vabene1111
fbadf14b58 Merge pull request #3238 from TandoorRecipes/dependabot/pip/crispy-bootstrap4-2024.1
Bump crispy-bootstrap4 from 2022.1 to 2024.1
2024-08-01 13:58:55 +02:00
vabene1111
2558fe6c2b Merge pull request #3237 from TandoorRecipes/dependabot/pip/aiohttp-3.10.0
Bump aiohttp from 3.9.4 to 3.10.0
2024-08-01 13:58:27 +02:00
vabene1111
10fca9b5ae Merge pull request #3235 from TandoorRecipes/dependabot/pip/pytest-xdist-3.6.1
Bump pytest-xdist from 3.5.0 to 3.6.1
2024-08-01 13:58:11 +02:00
dependabot[bot]
01f338e58b Bump aiohttp from 3.9.4 to 3.10.0
Bumps [aiohttp](https://github.com/aio-libs/aiohttp) from 3.9.4 to 3.10.0.
- [Release notes](https://github.com/aio-libs/aiohttp/releases)
- [Changelog](https://github.com/aio-libs/aiohttp/blob/master/CHANGES.rst)
- [Commits](https://github.com/aio-libs/aiohttp/compare/v3.9.4...v3.10.0)

---
updated-dependencies:
- dependency-name: aiohttp
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-01 11:58:10 +00:00
vabene1111
5e998796ab Merge pull request #3236 from TandoorRecipes/dependabot/pip/django-oauth-toolkit-2.4.0
Bump django-oauth-toolkit from 2.3.0 to 2.4.0
2024-08-01 13:57:51 +02:00
vabene1111
40231f45f6 Merge pull request #3239 from TandoorRecipes/dependabot/pip/validators-0.33.0
Bump validators from 0.20.0 to 0.33.0
2024-08-01 13:57:00 +02:00
vabene1111
b19b51c275 Merge pull request #3215 from mikhail5555/enable-global-logging-and-more-connector-logging
enable logging for whole project and add more logging to connectors
2024-08-01 13:52:20 +02:00
vabene1111
854877e685 Merge pull request #3226 from jknndy/Contribute-readme
Update link in Contributing section of readme
2024-08-01 13:49:30 +02:00
vabene1111
028a8ddbda Merge pull request #3227 from smilerz/scraper-updates
Scraper updates
2024-08-01 13:48:38 +02:00
dependabot[bot]
abb81209af Bump validators from 0.20.0 to 0.33.0
Bumps [validators](https://github.com/python-validators/validators) from 0.20.0 to 0.33.0.
- [Release notes](https://github.com/python-validators/validators/releases)
- [Changelog](https://github.com/python-validators/validators/blob/master/CHANGES.md)
- [Commits](https://github.com/python-validators/validators/compare/0.20.0...0.33.0)

---
updated-dependencies:
- dependency-name: validators
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-01 01:01:21 +00:00
dependabot[bot]
578201c519 Bump crispy-bootstrap4 from 2022.1 to 2024.1
Bumps [crispy-bootstrap4](https://github.com/django-crispy-forms/crispy-bootstrap4) from 2022.1 to 2024.1.
- [Release notes](https://github.com/django-crispy-forms/crispy-bootstrap4/releases)
- [Changelog](https://github.com/django-crispy-forms/crispy-bootstrap4/blob/main/CHANGELOG.md)
- [Commits](https://github.com/django-crispy-forms/crispy-bootstrap4/compare/2022.1...2024.1)

---
updated-dependencies:
- dependency-name: crispy-bootstrap4
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-01 01:01:19 +00:00
dependabot[bot]
a5a23b366e Bump django-oauth-toolkit from 2.3.0 to 2.4.0
Bumps [django-oauth-toolkit](https://github.com/jazzband/django-oauth-toolkit) from 2.3.0 to 2.4.0.
- [Release notes](https://github.com/jazzband/django-oauth-toolkit/releases)
- [Changelog](https://github.com/jazzband/django-oauth-toolkit/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jazzband/django-oauth-toolkit/compare/2.3.0...2.4.0)

---
updated-dependencies:
- dependency-name: django-oauth-toolkit
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-01 01:01:10 +00:00
dependabot[bot]
ac57837f53 Bump pytest-xdist from 3.5.0 to 3.6.1
Bumps [pytest-xdist](https://github.com/pytest-dev/pytest-xdist) from 3.5.0 to 3.6.1.
- [Release notes](https://github.com/pytest-dev/pytest-xdist/releases)
- [Changelog](https://github.com/pytest-dev/pytest-xdist/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest-xdist/compare/v3.5.0...v3.6.1)

---
updated-dependencies:
- dependency-name: pytest-xdist
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-01 01:01:08 +00:00
vabene1111
5cdc8302bb Translated using Weblate (German)
Currently translated at 98.3% (480 of 488 strings)

Translation: Tandoor/Recipes Backend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-backend/de/
2024-07-31 13:05:41 +00:00
smilerz
b095718545 add user-agent to URL import html request 2024-07-30 14:03:12 -05:00
smilerz
0b53285b89 bump recipe scrapers to 15.0.0 2024-07-29 10:01:31 -05:00
dudu dor
d1ea4360ca Translated using Weblate (Hebrew)
Currently translated at 4.7% (23 of 488 strings)

Translation: Tandoor/Recipes Backend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-backend/he/
2024-07-28 08:38:59 +00:00
dudu dor
257372db5a Translated using Weblate (Hebrew)
Currently translated at 100.0% (569 of 569 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/he/
2024-07-28 08:38:58 +00:00
Joey
855f20f2da Update README.md 2024-07-25 16:54:17 -04:00
Adam Krivanek
4f73e57ab2 Translated using Weblate (Czech)
Currently translated at 98.2% (559 of 569 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/cs/
2024-07-16 21:58:40 +00:00
Mikhail Epifanov
1b529bba10 update variable name and change default to warning, add docs 2024-07-13 22:41:08 +02:00
vabene1111
072cd00e59 Merge pull request #3216 from TandoorRecipes/dependabot/pip/django-4.2.14
Bump django from 4.2.11 to 4.2.14
2024-07-12 17:48:07 +02:00
dependabot[bot]
4b03c1a8dd Bump django from 4.2.11 to 4.2.14
Bumps [django](https://github.com/django/django) from 4.2.11 to 4.2.14.
- [Commits](https://github.com/django/django/compare/4.2.11...4.2.14)

---
updated-dependencies:
- dependency-name: django
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-10 22:10:20 +00:00
Mikhail Epifanov
f614413fb1 use self._logger everywhere 2024-07-10 11:17:06 +02:00
Mikhail Epifanov
74153d79b8 add process and thread name aswell 2024-07-10 10:56:39 +02:00
Mikhail Epifanov
edf06944e0 enable logging for whole project and add more logging to connectors 2024-07-10 10:54:41 +02:00
smilerz
a02582e9f8 rebase 2024-07-09 08:01:39 -05:00
vabene1111
c4ff29beda added missing requirement for openapi endpoint 2024-07-09 07:20:49 +02:00
vabene1111
cc839a1ae9 Merge branch 'develop' 2024-07-08 20:32:15 +02:00
vabene1111
af9a95651d test respect new validation logic 2024-07-08 18:13:49 +02:00
vabene1111
45106ae99a Merge branch 'develop' of https://github.com/TandoorRecipes/recipes into develop 2024-07-08 18:02:50 +02:00
vabene1111
0ac3c55180 update translations 2024-07-08 18:02:44 +02:00
vabene1111
a289fd427b Merge pull request #3204 from AlD/develop
Gracefully handle lookup errors in resolveDjangoUrl
2024-07-08 17:44:00 +02:00
smilerz
6385866e98 url import fixes 2024-07-08 08:35:59 -05:00
smilerz
c2176305db fix invalid syntax in admin/step 2024-07-08 08:28:49 -05:00
Jean-Félix ALLARD
fd3760198b Translated using Weblate (French)
Currently translated at 96.8% (551 of 569 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/fr/
2024-07-05 16:38:58 +00:00
Taylan TATLI
826ddddd5d Translated using Weblate (Turkish)
Currently translated at 100.0% (569 of 569 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/tr/
2024-07-03 16:39:00 +00:00
Taylan TATLI
93613c9781 Translated using Weblate (Turkish)
Currently translated at 6.8% (33 of 485 strings)

Translation: Tandoor/Recipes Backend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-backend/tr/
2024-07-03 16:39:00 +00:00
Daniel Albers
818ca0b2e4 Gracefully handle lookup errors in resolveDjangoUrl 2024-07-03 13:45:33 +02:00
vabene1111
17d34c5ca7 improved allowed hosts docs, default config and added a system warning 2024-06-27 13:48:11 +02:00
vabene1111
965f7c04d8 Merge pull request #3188 from TandoorRecipes/dependabot/npm_and_yarn/vue/ws-7.5.10
Bump ws from 7.5.9 to 7.5.10 in /vue
2024-06-27 13:26:40 +02:00
vabene1111
0e1e312f7c Merge pull request #3196 from TandoorRecipes/dependabot/pip/djangorestframework-3.15.2
Bump djangorestframework from 3.14.0 to 3.15.2
2024-06-27 13:26:09 +02:00
dependabot[bot]
202d8afa10 Bump djangorestframework from 3.14.0 to 3.15.2
Bumps [djangorestframework](https://github.com/encode/django-rest-framework) from 3.14.0 to 3.15.2.
- [Release notes](https://github.com/encode/django-rest-framework/releases)
- [Commits](https://github.com/encode/django-rest-framework/compare/3.14.0...3.15.2)

---
updated-dependencies:
- dependency-name: djangorestframework
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-26 19:05:46 +00:00
Renato
769561349f Translated using Weblate (Portuguese (Brazil))
Currently translated at 89.2% (508 of 569 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/pt_BR/
2024-06-21 14:38:58 +00:00
dependabot[bot]
0cb415f70d Bump ws from 7.5.9 to 7.5.10 in /vue
Bumps [ws](https://github.com/websockets/ws) from 7.5.9 to 7.5.10.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/7.5.9...7.5.10)

---
updated-dependencies:
- dependency-name: ws
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-18 17:23:52 +00:00
tarek EL SOL
6d4dbc26a4 Translated using Weblate (French)
Currently translated at 87.2% (423 of 485 strings)

Translation: Tandoor/Recipes Backend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-backend/fr/
2024-05-28 00:57:11 +00:00
vabene1111
63759c985f Merge pull request #3160 from TandoorRecipes/dependabot/pip/requests-2.32.0
Bump requests from 2.31.0 to 2.32.0
2024-05-21 16:11:16 +02:00
dependabot[bot]
98d4ce5ff8 ---
updated-dependencies:
- dependency-name: requests
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-21 05:30:33 +00:00
only
2cf9c288be Translated using Weblate (Chinese (Traditional))
Currently translated at 8.2% (47 of 569 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/zh_Hant/
2024-05-19 13:38:57 +00:00
only
9254a36636 Translated using Weblate (Chinese (Traditional))
Currently translated at 11.3% (55 of 485 strings)

Translation: Tandoor/Recipes Backend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-backend/zh_Hant/
2024-05-19 13:38:57 +00:00
Jakob Priesner
3f258fbd87 Translated using Weblate (German)
Currently translated at 98.7% (479 of 485 strings)

Translation: Tandoor/Recipes Backend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-backend/de/
2024-05-11 00:33:05 +00:00
vabene1111
7100f4eb8b Merge pull request #3147 from bhagerty/patch-1
Remove obsolete "version: 3" to eliminate warning message
2024-05-07 07:56:00 +02:00
vabene1111
7285d8b01c Merge pull request #3150 from bhagerty/develop
Delete obsolete "version" entry from last two compose.yml files
2024-05-07 07:55:23 +02:00
vabene1111
78da168a2e Merge pull request #3149 from bhagerty/patch-2
Remove obsolete "version:" entry
2024-05-07 07:55:02 +02:00
vabene1111
f54009ae00 Merge pull request #3151 from TandoorRecipes/dependabot/pip/jinja2-3.1.4
Bump jinja2 from 3.1.3 to 3.1.4
2024-05-07 07:53:34 +02:00
dependabot[bot]
f92f18ecb2 Bump jinja2 from 3.1.3 to 3.1.4
Bumps [jinja2](https://github.com/pallets/jinja) from 3.1.3 to 3.1.4.
- [Release notes](https://github.com/pallets/jinja/releases)
- [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/jinja/compare/3.1.3...3.1.4)

---
updated-dependencies:
- dependency-name: jinja2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-06 20:55:38 +00:00
Brian Hagerty
44832f7c11 Delete obsolete "version" entry from compose.yml
Per my other PR, "version" is obsolete
2024-05-06 12:38:13 -05:00
Brian Hagerty
e475115b6a Delete obsolete "version" entry
Per my first PR, "version" is obsolete and throws a warning.
2024-05-06 12:36:53 -05:00
Brian Hagerty
b32a7a9134 Remove obsolete "version:" entry
Per my other PR, "version" is obsolete and throws a warning.
2024-05-06 12:31:35 -05:00
Brian Hagerty
381adb2a5b Merge pull request #1 from TandoorRecipes/develop
Translated using Weblate (German)
2024-05-06 12:29:48 -05:00
Carsten Docktor
d976fafd45 Translated using Weblate (German)
Currently translated at 95.6% (464 of 485 strings)

Translation: Tandoor/Recipes Backend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-backend/de/
2024-05-04 19:10:19 +00:00
Brian Hagerty
7e7657e444 Remove obsolete "version: 3" to eliminate warning message
The "version: 3" entry is obsolete and throws a warning: 'version' is obsolete. AFAIK, there's no reason to keep it. There's a lengthy discussion of this issue in a different repo: https://github.com/jasonacox/Powerwall-Dashboard/issues/453

They got rid of "version" in that project. It seems like it should be removed here too.
2024-05-04 11:00:08 -05:00
vabene1111
4b551c595a MealPlan from/to date to datetime, added time to MealType 2024-05-01 13:45:12 +02:00
vabene1111
c87964f6d0 Merge pull request #3132 from smilerz/collectstatic_fix
removing pre-cached staticfiles from Docker & boot.sh
2024-04-30 17:55:41 +02:00
Fymyte
353b2d6d21 Translated using Weblate (French)
Currently translated at 96.8% (551 of 569 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/fr/
2024-04-30 14:59:33 +00:00
smilerz
1d58f318ca removing pre-cached staticfiles from Docker & boot.sh 2024-04-30 07:21:30 -05:00
vabene1111
771375b40b added missing doctype attribute 2024-04-27 09:28:19 +02:00
vabene1111
1e4f6d243c Merge pull request #3120 from ellezhu1/planToEat
Fix #2982 - PlantoEat Importer
2024-04-22 08:03:43 +02:00
vabene1111
717c989ae9 Merge pull request #3121 from ellezhu1/nextCloud
Fix #3060 Next Cloud handle special ingredients ##
2024-04-22 08:03:00 +02:00
ellezhu1
4933726b79 made some changes 2024-04-21 21:23:40 +00:00
ellezhu1
d81e7f6c2b remove ##ingredients 2024-04-21 11:28:51 +00:00
ellezhu1
f1ab60bcd1 Merge branch 'develop' into planToEat 2024-04-21 06:18:51 -05:00
ellezhu1
68e6ab4be5 get step name 2024-04-21 08:31:29 +00:00
ellezhu1
7ea9592398 tested 2024-04-21 06:25:02 +00:00
ellezhu1
52d8e8d9ba issue2982 - plantToEat 2024-04-21 06:09:55 +00:00
vabene1111
b7e23df4c2 Merge pull request #3115 from TandoorRecipes/dependabot/pip/aiohttp-3.9.4
Bump aiohttp from 3.9.3 to 3.9.4
2024-04-19 07:31:52 +02:00
dependabot[bot]
fce57f7f03 Bump aiohttp from 3.9.3 to 3.9.4
Bumps [aiohttp](https://github.com/aio-libs/aiohttp) from 3.9.3 to 3.9.4.
- [Release notes](https://github.com/aio-libs/aiohttp/releases)
- [Changelog](https://github.com/aio-libs/aiohttp/blob/master/CHANGES.rst)
- [Commits](https://github.com/aio-libs/aiohttp/compare/v3.9.3...v3.9.4)

---
updated-dependencies:
- dependency-name: aiohttp
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-18 16:18:46 +00:00
vabene1111
7eaa33ac69 Merge pull request #3113 from TandoorRecipes/dependabot/pip/gunicorn-22.0.0
Bump gunicorn from 21.2.0 to 22.0.0
2024-04-18 09:38:53 +02:00
dependabot[bot]
7ce2c042c3 Bump gunicorn from 21.2.0 to 22.0.0
Bumps [gunicorn](https://github.com/benoitc/gunicorn) from 21.2.0 to 22.0.0.
- [Release notes](https://github.com/benoitc/gunicorn/releases)
- [Commits](https://github.com/benoitc/gunicorn/compare/21.2.0...22.0.0)

---
updated-dependencies:
- dependency-name: gunicorn
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-17 02:51:06 +00:00
vabene1111
371d8a76b8 added flake8 watcher 2024-04-14 18:58:52 +02:00
vabene1111
7f63451b9a Merge pull request #3095 from Manon-ds/fixRounding
fix: rounding units
2024-04-14 18:21:28 +02:00
vabene1111
ee8237d493 Merge pull request #3101 from tooboredtocode/develop
improve docker run speed
2024-04-14 18:20:06 +02:00
vabene1111
91d3c43422 Merge pull request #3109 from smilerz/recipe_scrapers
Compatible with recipe_scrapers v15
2024-04-14 18:15:20 +02:00
smilerz
1700b9c531 change test_automations to use scrape_html
remove reliance on custom text_scraper class
changed url on test case to generic wildmode vs specific site
2024-04-12 09:20:56 -05:00
smilerz
7133249f4b update recipe_scrapers to use scrape_html
scrape_me has been deprecated
2024-04-12 08:11:59 -05:00
smilerz
ab9ea87549 upgrade recipe-scrapers 2024-04-12 08:11:58 -05:00
smilerz
975ad34672 Revert "tests for pk only nested serializer"
This reverts commit 714242b6df.
2024-04-12 07:02:57 -05:00
smilerz
6cb6861228 Revert "Revert "moved prettier configuration to .prettierrc""
This reverts commit cc24964368.
2024-04-12 07:02:42 -05:00
smilerz
cc24964368 Revert "moved prettier configuration to .prettierrc"
This reverts commit c33c4ed79b.
2024-04-11 18:24:44 -05:00
smilerz
714242b6df tests for pk only nested serializer 2024-04-11 17:36:24 -05:00
smilerz
c33c4ed79b moved prettier configuration to .prettierrc 2024-04-11 07:27:22 -05:00
vabene1111
971f8f3dad Merge pull request #3102 from smilerz/yapf_prettier
Yapf prettier
2024-04-11 07:46:12 +02:00
vabene1111
ca5fda7927 added property type delete admin 2024-04-10 20:04:17 +02:00
smilerz
2e6cc3e58e document configurations required for formatting and linting 2024-04-08 19:16:18 -05:00
tooboredtocode
42b7d1afcb fix: image not working in docker compose environments 2024-04-08 23:58:10 +02:00
tooboredtocode
99868e4e80 Reapply "Merge pull request #3055 from tooboredtocode/develop"
This reverts commit f14acc371d.
2024-04-08 23:56:49 +02:00
smilerz
38b22f3a56 setup project level linting with flake8
project level formatting with prettier
project level formatting with yapf
2024-04-08 10:49:53 -05:00
Manon Brun
b70a3bce9f Merge branch 'develop' into fixRounding 2024-04-08 09:13:57 +01:00
vabene1111
fb821ba0ef Merge branch 'develop' 2024-04-08 07:21:09 +02:00
vabene1111
f14acc371d Revert "Merge pull request #3055 from tooboredtocode/develop"
This reverts commit d7669279ff, reversing
changes made to 4293ec77c0.
2024-04-08 07:20:41 +02:00
vabene1111
c031db9019 downgraded recipe scrapers to pass tests for now 2024-04-05 21:18:01 +02:00
Manon Brun
78686faad3 fix: rounding units 2024-04-05 15:57:09 +01:00
vabene1111
b9e806b818 Merge branch 'develop' 2024-04-04 20:57:53 +02:00
vabene1111
d7669279ff Merge pull request #3055 from tooboredtocode/develop
Improve docker run speeds
2024-04-04 20:52:48 +02:00
vabene1111
4293ec77c0 fixed changing categories of shopping items 2024-04-04 20:49:48 +02:00
vabene1111
0a30c39add Merge pull request #3082 from TandoorRecipes/dependabot/github_actions/awalsh128/cache-apt-pkgs-action-1.4.2
Bump awalsh128/cache-apt-pkgs-action from 1.4.1 to 1.4.2
2024-04-04 20:42:52 +02:00
vabene1111
1b6449270b Merge pull request #3081 from TandoorRecipes/dependabot/pip/beautifulsoup4-4.12.3
Bump beautifulsoup4 from 4.12.2 to 4.12.3
2024-04-04 20:42:41 +02:00
vabene1111
3ae264eea7 Merge pull request #3080 from TandoorRecipes/dependabot/pip/django-debug-toolbar-4.3.0
Bump django-debug-toolbar from 4.2.0 to 4.3.0
2024-04-04 20:42:35 +02:00
vabene1111
c9dc7164f5 Merge pull request #3078 from TandoorRecipes/dependabot/pip/pytest-cov-5.0.0
Bump pytest-cov from 4.1.0 to 5.0.0
2024-04-04 20:42:22 +02:00
vabene1111
5751ba1ec5 Merge pull request #3079 from TandoorRecipes/dependabot/pip/django-crispy-forms-2.1
Bump django-crispy-forms from 2.0 to 2.1
2024-04-04 20:42:16 +02:00
vabene1111
3eca8c6db4 Merge pull request #3077 from TandoorRecipes/dependabot/pip/recipe-scrapers-14.55.0
Bump recipe-scrapers from 14.52.0 to 14.55.0
2024-04-04 20:42:03 +02:00
vabene1111
5cccbb8e5c Merge pull request #3092 from TandoorRecipes/dependabot/pip/pillow-10.3.0
Bump pillow from 10.2.0 to 10.3.0
2024-04-04 15:56:09 +02:00
dependabot[bot]
4390703c0c Bump pillow from 10.2.0 to 10.3.0
Bumps [pillow](https://github.com/python-pillow/Pillow) from 10.2.0 to 10.3.0.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst)
- [Commits](https://github.com/python-pillow/Pillow/compare/10.2.0...10.3.0)

---
updated-dependencies:
- dependency-name: pillow
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-03 16:22:02 +00:00
smilerz
47bc3cfbe7 Update backup.md
update compose configuration for pgbackup to include .env file
2024-04-03 09:07:09 -05:00
atom karinca
30a2012e90 Translated using Weblate (Turkish)
Currently translated at 5.9% (29 of 485 strings)

Translation: Tandoor/Recipes Backend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-backend/tr/
2024-04-01 22:04:36 +00:00
dependabot[bot]
b38ea866b4 Bump awalsh128/cache-apt-pkgs-action from 1.4.1 to 1.4.2
Bumps [awalsh128/cache-apt-pkgs-action](https://github.com/awalsh128/cache-apt-pkgs-action) from 1.4.1 to 1.4.2.
- [Release notes](https://github.com/awalsh128/cache-apt-pkgs-action/releases)
- [Commits](https://github.com/awalsh128/cache-apt-pkgs-action/compare/v1.4.1...v1.4.2)

---
updated-dependencies:
- dependency-name: awalsh128/cache-apt-pkgs-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-01 01:02:35 +00:00
dependabot[bot]
5a0b9e14d2 Bump beautifulsoup4 from 4.12.2 to 4.12.3
Bumps [beautifulsoup4](https://www.crummy.com/software/BeautifulSoup/bs4/) from 4.12.2 to 4.12.3.

---
updated-dependencies:
- dependency-name: beautifulsoup4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-01 00:53:28 +00:00
dependabot[bot]
4f0f59a55c Bump django-debug-toolbar from 4.2.0 to 4.3.0
Bumps [django-debug-toolbar](https://github.com/jazzband/django-debug-toolbar) from 4.2.0 to 4.3.0.
- [Release notes](https://github.com/jazzband/django-debug-toolbar/releases)
- [Changelog](https://github.com/jazzband/django-debug-toolbar/blob/main/docs/changes.rst)
- [Commits](https://github.com/jazzband/django-debug-toolbar/compare/4.2...4.3)

---
updated-dependencies:
- dependency-name: django-debug-toolbar
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-01 00:53:25 +00:00
dependabot[bot]
768b678c93 Bump django-crispy-forms from 2.0 to 2.1
Bumps [django-crispy-forms](https://github.com/django-crispy-forms/django-crispy-forms) from 2.0 to 2.1.
- [Release notes](https://github.com/django-crispy-forms/django-crispy-forms/releases)
- [Changelog](https://github.com/django-crispy-forms/django-crispy-forms/blob/main/CHANGELOG.md)
- [Commits](https://github.com/django-crispy-forms/django-crispy-forms/compare/2.0...2.1)

---
updated-dependencies:
- dependency-name: django-crispy-forms
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-01 00:53:19 +00:00
dependabot[bot]
10373b6ac5 Bump pytest-cov from 4.1.0 to 5.0.0
Bumps [pytest-cov](https://github.com/pytest-dev/pytest-cov) from 4.1.0 to 5.0.0.
- [Changelog](https://github.com/pytest-dev/pytest-cov/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest-cov/compare/v4.1.0...v5.0.0)

---
updated-dependencies:
- dependency-name: pytest-cov
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-01 00:53:12 +00:00
dependabot[bot]
4e0780d512 Bump recipe-scrapers from 14.52.0 to 14.55.0
Bumps [recipe-scrapers](https://github.com/hhursev/recipe-scrapers) from 14.52.0 to 14.55.0.
- [Release notes](https://github.com/hhursev/recipe-scrapers/releases)
- [Commits](https://github.com/hhursev/recipe-scrapers/compare/14.52.0...14.55.0)

---
updated-dependencies:
- dependency-name: recipe-scrapers
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-01 00:53:06 +00:00
atom karinca
959ad2a45c Translated using Weblate (Turkish)
Currently translated at 33.7% (192 of 569 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/tr/
2024-03-31 20:08:43 +00:00
vabene1111
94045905d3 Merge pull request #3069 from TandoorRecipes/dependabot/npm_and_yarn/vue/express-4.19.2
Bump express from 4.18.2 to 4.19.2 in /vue
2024-03-28 07:40:49 +01:00
dependabot[bot]
ad8d8daf79 Bump express from 4.18.2 to 4.19.2 in /vue
Bumps [express](https://github.com/expressjs/express) from 4.18.2 to 4.19.2.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.18.2...4.19.2)

---
updated-dependencies:
- dependency-name: express
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-28 06:40:03 +00:00
vabene1111
b623abf81e Merge pull request #3067 from Mikhail5555/move-away-from-homeassistant-api
use normal async client for api calls
2024-03-28 07:38:43 +01:00
tooboredtocode
f8b8d3f199 Merge branch 'TandoorRecipes:develop' into develop 2024-03-27 23:31:44 +01:00
Axel Breiterman
be388b0d10 Translated using Weblate (Spanish)
Currently translated at 53.1% (258 of 485 strings)

Translation: Tandoor/Recipes Backend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-backend/es/
2024-03-27 19:02:41 +00:00
Mikhail Epifanov
41a448578a extra check if we arent accidently doing a query 2024-03-26 23:21:23 +01:00
Mikhail Epifanov
441c55936d use normal async client for api calls 2024-03-26 22:46:04 +01:00
vabene1111
b67281bbc8 fixed property helper calculation 2024-03-25 20:27:33 +01:00
vabene1111
5a1a5f3c4d Merge pull request #3057 from TandoorRecipes/dependabot/npm_and_yarn/vue/webpack-dev-middleware-5.3.4
Bump webpack-dev-middleware from 5.3.3 to 5.3.4 in /vue
2024-03-25 07:43:18 +01:00
vabene1111
30e2fc4895 Merge pull request #3052 from smilerz/test_performance
Test performance
2024-03-25 07:33:39 +01:00
vabene1111
57304f9c6c Merge pull request #3059 from richid/fix-system-issue-3503
bug: Fix TypeError at /system due to invalid PostgreSQL values [Closes #3053]
2024-03-25 07:31:28 +01:00
jorge Teixeira
87327b0959 Translated using Weblate (Portuguese (Brazil))
Currently translated at 84.5% (481 of 569 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/pt_BR/
2024-03-24 16:02:39 +00:00
Rich Schumacher
7957413ca0 bug: Fix TypeError at /system due to invalid PostgreSQL values [Closes #3053]
The bug was a missing tuple index introduced in #3027. Added the index
and also wrapped everything in a try/catch to prevent future issues.
2024-03-23 15:31:44 -04:00
dependabot[bot]
d99a157416 Bump webpack-dev-middleware from 5.3.3 to 5.3.4 in /vue
Bumps [webpack-dev-middleware](https://github.com/webpack/webpack-dev-middleware) from 5.3.3 to 5.3.4.
- [Release notes](https://github.com/webpack/webpack-dev-middleware/releases)
- [Changelog](https://github.com/webpack/webpack-dev-middleware/blob/v5.3.4/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-dev-middleware/compare/v5.3.3...v5.3.4)

---
updated-dependencies:
- dependency-name: webpack-dev-middleware
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-23 06:40:34 +00:00
tooboredtocode
20b812c2cc feat: re-add venv 2024-03-22 19:04:29 +01:00
tooboredtocode
7bfa23b953 feat: better messages 2024-03-22 11:32:30 +01:00
tooboredtocode
ae37abf8b2 fix: fix modified the wrong file 2024-03-22 11:26:26 +01:00
tooboredtocode
5f211e420e fix: moving into exisiting files 2024-03-22 02:50:18 +01:00
tooboredtocode
1235cb8da5 feat: improve docker run speeds 2024-03-22 00:50:02 +01:00
smilerz
5e3a5eb8f5 fix errant IF statement 2024-03-21 09:18:38 -05:00
smilerz
b6a42e8e81 enable parallel test execution 2024-03-21 09:13:11 -05:00
smilerz
49539ef3ba add TEST_DATABASE env parameters 2024-03-21 09:11:57 -05:00
Johannes Jandke
db310c4076 Translated using Weblate (German)
Currently translated at 100.0% (569 of 569 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/de/
2024-03-21 14:02:41 +00:00
vabene1111
0248e1c500 Merge pull request #3006 from TandoorRecipes/dependabot/pip/django-cors-headers-4.3.1
Bump django-cors-headers from 4.2.0 to 4.3.1
2024-03-21 14:59:33 +01:00
vabene1111
db04386997 Merge pull request #3008 from TandoorRecipes/dependabot/pip/cryptography-42.0.5
Bump cryptography from 42.0.4 to 42.0.5
2024-03-21 14:59:16 +01:00
vabene1111
54f0b2b036 Merge pull request #3009 from TandoorRecipes/dependabot/pip/gunicorn-21.2.0
Bump gunicorn from 20.1.0 to 21.2.0
2024-03-21 14:59:04 +01:00
smilerz
33b23b299d removed unused docs/coverage/ reports 2024-03-21 08:58:32 -05:00
smilerz
a047613edb enabled entire test_recipe_full_text_search unit tests 2024-03-21 08:56:45 -05:00
smilerz
149cf93618 removed unused CustomTestRunner 2024-03-21 08:56:21 -05:00
vabene1111
20e0c948c4 Merge branch 'develop' 2024-03-21 14:40:23 +01:00
vabene1111
ceb68af503 compiled and made messages 2024-03-21 14:40:13 +01:00
vabene1111
d8c86a4bb8 Merge pull request #3048 from smilerz/shoppinglist_fix
Shoppinglist fix
2024-03-21 14:08:23 +01:00
dependabot[bot]
a9dcc7261c Bump cryptography from 42.0.4 to 42.0.5
Bumps [cryptography](https://github.com/pyca/cryptography) from 42.0.4 to 42.0.5.
- [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pyca/cryptography/compare/42.0.4...42.0.5)

---
updated-dependencies:
- dependency-name: cryptography
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-21 13:04:03 +00:00
vabene1111
341c6abc02 Merge pull request #3046 from TandoorRecipes/dependabot/pip/django-4.2.11
Bump django from 4.2.10 to 4.2.11
2024-03-21 14:03:09 +01:00
Tomasz Klimczak
5c2d92103b Translated using Weblate (Polish)
Currently translated at 100.0% (569 of 569 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/pl/
2024-03-19 23:47:14 +00:00
Johannes Jandke
7b9bd5bc2a Translated using Weblate (German)
Currently translated at 100.0% (569 of 569 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/de/
2024-03-19 23:47:13 +00:00
Thomas
e242412ec4 Translated using Weblate (German)
Currently translated at 100.0% (569 of 569 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/de/
2024-03-19 23:47:13 +00:00
Bastian
6aaec29c8a Translated using Weblate (German)
Currently translated at 100.0% (569 of 569 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/de/
2024-03-19 23:47:13 +00:00
Tomasz Klimczak
854af133c4 Translated using Weblate (Polish)
Currently translated at 46.8% (227 of 485 strings)

Translation: Tandoor/Recipes Backend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-backend/pl/
2024-03-19 23:47:13 +00:00
Johannes Jandke
ac961ef7d2 Translated using Weblate (German)
Currently translated at 91.5% (444 of 485 strings)

Translation: Tandoor/Recipes Backend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-backend/de/
2024-03-19 23:47:13 +00:00
smilerz
b6f3ed6bd9 handle auto_onhand on bulkShoppingListEntry api 2024-03-19 09:12:31 -05:00
Johannes Jandke
ccf56e24be Translated using Weblate (German)
Currently translated at 100.0% (569 of 569 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/de/
2024-03-19 13:59:35 +00:00
Anthony BARRIER
5298b69d83 Translated using Weblate (French)
Currently translated at 95.6% (544 of 569 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/fr/
2024-03-19 13:59:35 +00:00
Lukas B
f2f004db87 Translated using Weblate (German)
Currently translated at 100.0% (569 of 569 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/de/
2024-03-19 13:59:35 +00:00
Johannes Jandke
9416406732 Translated using Weblate (German)
Currently translated at 100.0% (569 of 569 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/de/
2024-03-19 13:59:35 +00:00
Jan
eeae2c1740 Translated using Weblate (German)
Currently translated at 100.0% (569 of 569 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/de/
2024-03-19 13:59:35 +00:00
Anthony BARRIER
45d3fd34be Translated using Weblate (French)
Currently translated at 87.2% (423 of 485 strings)

Translation: Tandoor/Recipes Backend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-backend/fr/
2024-03-19 13:59:35 +00:00
smilerz
bd61906aa4 counting delayed unchecked should check if null or in past 2024-03-18 18:09:56 -05:00
dependabot[bot]
c322782e89 Bump django from 4.2.10 to 4.2.11
Bumps [django](https://github.com/django/django) from 4.2.10 to 4.2.11.
- [Commits](https://github.com/django/django/compare/4.2.10...4.2.11)

---
updated-dependencies:
- dependency-name: django
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-18 20:53:10 +00:00
vabene1111
2e6becb73d Merge pull request #3041 from TandoorRecipes/dependabot/npm_and_yarn/vue/follow-redirects-1.15.6
Bump follow-redirects from 1.15.5 to 1.15.6 in /vue
2024-03-17 10:10:50 +01:00
dependabot[bot]
d2aeef7e63 Bump follow-redirects from 1.15.5 to 1.15.6 in /vue
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.5 to 1.15.6.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.5...v1.15.6)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-17 00:25:33 +00:00
Miguel
8e700ba53c Translated using Weblate (Spanish)
Currently translated at 99.4% (566 of 569 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/es/
2024-03-16 09:02:46 +00:00
vabene1111
2f203d7786 reverted api plan ical having optional parameters 2024-03-15 19:11:11 +01:00
smilerz
2d021a83cf Update launch.json
adding .vscode configuration to the project broke/changed a bunch of stuff.  this fixes the ability to debug pytest
2024-03-13 08:25:22 -05:00
Tor Stokka
dda2cc16e7 Translated using Weblate (Norwegian Bokmål)
Currently translated at 65.2% (371 of 569 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/nb_NO/
2024-03-11 13:02:39 +00:00
Kn
07957814f9 Translated using Weblate (Swedish)
Currently translated at 100.0% (569 of 569 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/sv/
2024-03-11 13:02:39 +00:00
Kn
658bc5ca54 Translated using Weblate (Swedish)
Currently translated at 55.2% (268 of 485 strings)

Translation: Tandoor/Recipes Backend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-backend/sv/
2024-03-11 13:02:39 +00:00
vabene1111
539eb8e612 make and compile all messages 2024-03-10 07:25:13 +01:00
Kn
ba54a44e04 Translated using Weblate (Finnish)
Currently translated at 37.1% (211 of 568 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/fi/
2024-03-10 06:12:01 +00:00
Kn
5ecddaf02f Translated using Weblate (Finnish)
Currently translated at 4.4% (22 of 493 strings)

Translation: Tandoor/Recipes Backend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-backend/fi/
2024-03-10 06:12:01 +00:00
Kn
a6c0dba684 Translated using Weblate (Swedish)
Currently translated at 100.0% (568 of 568 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/sv/
2024-03-10 06:12:01 +00:00
Kn
7986d9c8f3 Translated using Weblate (Swedish)
Currently translated at 100.0% (371 of 371 strings)

Translation: Tandoor/Recipes Backend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-backend/sv/
2024-03-10 06:12:01 +00:00
vabene1111
02523f5325 fixed duplicate operation ID for plan-ical endpoint 2024-03-09 12:54:49 +01:00
vabene1111
36887b3488 added open data slug to shopping category form 2024-03-09 12:36:24 +01:00
vabene1111
bb77f80abf fixed shopping category headers showing when only containing delayed entries 2024-03-09 07:56:22 +01:00
vabene1111
9c92e0f4c0 fixed deleteting the selected supermarket in shopping breaking page 2024-03-09 07:47:33 +01:00
vabene1111
a6e8fa8ddf Merge branch 'develop' of https://github.com/TandoorRecipes/recipes into develop 2024-03-09 07:44:36 +01:00
vabene1111
37fb0418ac fixed default page setting and made PWA respect that setting 2024-03-09 07:44:32 +01:00
vabene1111
2264050d40 Merge pull request #3027 from richid/system-pg-version-fix
bug: Fix decimal.InvalidOperation on /system for some PG versions
2024-03-09 07:32:23 +01:00
vabene1111
aebc4a45ff fixed boot script for systems that dont support ipv6 2024-03-09 07:31:28 +01:00
Enric Bergadà
f061e02a95 Translated using Weblate (Catalan)
Currently translated at 14.0% (80 of 568 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/ca/
2024-03-08 23:19:57 +00:00
Enric Bergadà
952d50d8dd Translated using Weblate (Catalan)
Currently translated at 85.5% (419 of 490 strings)

Translation: Tandoor/Recipes Backend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-backend/ca/
2024-03-08 23:19:56 +00:00
Rich Schumacher
3489216daf bug: Fix decimal.InvalidOperation on /system for some PG versions
In https://github.com/TandoorRecipes/recipes/pull/2730 the /system page was improved to warn the user if the version of Postgres they are using is out of date and should be updated. The current code attempts to determine the major versions by replacing `00` with `.` and then converting to a `Decimal`. Unfortunately, it appears the only value this method _does not_ work for are initial releases of major versions, like `16.0.0`.

For reference, either Postgres or the PsyCog driver represents the semver values but without the dots, so `16.0.0` becomes `1600000`.

This change removes the string replace and Decimal conversion in favor of using the divmod() function. In this application it will return a tuple with the first element being the major version of Postgres. This is then used as before to compare against deprecated versions.
2024-03-07 20:47:40 -05:00
Enric Bergadà
8e9285a24e Added translation using Weblate (Catalan) 2024-03-07 22:49:50 +00:00
Michel Blankenstein
8f55e15767 Translated using Weblate (Dutch)
Currently translated at 91.3% (518 of 567 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/nl/
2024-03-05 22:19:58 +00:00
Jan
f2ce164a1e Translated using Weblate (German)
Currently translated at 99.1% (562 of 567 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/de/
2024-03-05 22:19:58 +00:00
Jocelin Lebreton
bfdd5a8bfc Translated using Weblate (French)
Currently translated at 96.5% (473 of 490 strings)

Translation: Tandoor/Recipes Backend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-backend/fr/
2024-03-05 22:19:58 +00:00
dependabot[bot]
cf61de0dba Bump gunicorn from 20.1.0 to 21.2.0
Bumps [gunicorn](https://github.com/benoitc/gunicorn) from 20.1.0 to 21.2.0.
- [Release notes](https://github.com/benoitc/gunicorn/releases)
- [Commits](https://github.com/benoitc/gunicorn/compare/20.1.0...21.2.0)

---
updated-dependencies:
- dependency-name: gunicorn
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-01 00:05:19 +00:00
dependabot[bot]
29a937c44d Bump django-cors-headers from 4.2.0 to 4.3.1
Bumps [django-cors-headers](https://github.com/adamchainz/django-cors-headers) from 4.2.0 to 4.3.1.
- [Changelog](https://github.com/adamchainz/django-cors-headers/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/adamchainz/django-cors-headers/compare/4.2.0...4.3.1)

---
updated-dependencies:
- dependency-name: django-cors-headers
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-01 00:04:56 +00:00
307 changed files with 46124 additions and 60351 deletions

View File

@@ -6,6 +6,9 @@
# random secret key, use for example `base64 /dev/urandom | head -c50` to generate one
SECRET_KEY=
# allowed hosts (see documentation), should be set to your hostname(s) but might be * (default) for some proxies/providers
# ALLOWED_HOSTS=recipes.mydomain.com
# add only a database password if you want to run with the default postgres, otherwise change settings accordingly
DB_ENGINE=django.db.backends.postgresql
POSTGRES_HOST=db_recipes

22
.flake8 Normal file
View File

@@ -0,0 +1,22 @@
[flake8]
extend-ignore =
# Whitespace before ':' - Required for black compatibility
E203,
# Line break occurred before a binary operator - Required for black compatibility
W503,
# Comparison to False should be 'if cond is False:' or 'if not cond:'
E712
exclude =
.git,
**/__pycache__,
**/.git,
**/.svn,
**/.hg,
**/CVS,
**/.DS_Store,
.vscode,
**/*.pyc
per-file-ignores=
cookbook/apps.py:F401
max-line-length = 179

View File

@@ -14,7 +14,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: awalsh128/cache-apt-pkgs-action@v1.4.1
- uses: awalsh128/cache-apt-pkgs-action@v1.4.2
with:
packages: libsasl2-dev python3-dev libldap2-dev libssl-dev
version: 1.0

28
.gitignore vendored
View File

@@ -47,6 +47,11 @@ docs/reports/**
# Django stuff:
*.log
mediafiles/
*.sqlite3*
staticfiles/
postgresql/
data/
# Sphinx documentation
docs/_build/
@@ -59,32 +64,23 @@ target/
\.idea/dataSources\.local\.xml
venv/
mediafiles/
*.sqlite3*
\.idea/workspace\.xml
\.idea/misc\.xml
# Deployment
\.env
staticfiles/
postgresql/
data/
cookbook/static/vue
vue/webpack-stats.json
/docker-compose.override.yml
vue/node_modules
plugins
vetur.config.js
cookbook/static/vue
vue/webpack-stats.json
vue3/node_modules
cookbook/templates/sw.js
.prettierignore
vue/.yarn
vue3/.vite
vue3/node_modules
# Configs
vetur.config.js
venv/

31
.idea/watcherTasks.xml generated Normal file
View File

@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectTasksOptions">
<TaskOptions isEnabled="false">
<option name="arguments" value="-m flake8 $FilePath$ --config $ContentRoot$\.flake8" />
<option name="checkSyntaxErrors" value="true" />
<option name="description" />
<option name="exitCodeBehavior" value="ALWAYS" />
<option name="fileExtension" value="py" />
<option name="immediateSync" value="false" />
<option name="name" value="Flake8 Watcher" />
<option name="output" value="$FilePath$" />
<option name="outputFilters">
<array>
<FilterInfo>
<option name="description" value="" />
<option name="name" value="" />
<option name="regExp" value="$FILE_PATH$:$LINE$:$COLUMN$: $MESSAGE$" />
</FilterInfo>
</array>
</option>
<option name="outputFromStdout" value="false" />
<option name="program" value="$PyInterpreterDirectory$/python" />
<option name="runOnExternalChanges" value="false" />
<option name="scopeName" value="Current File" />
<option name="trackOnlyRoot" value="false" />
<option name="workingDir" value="" />
<envs />
</TaskOptions>
</component>
</project>

13
.prettierignore Normal file
View File

@@ -0,0 +1,13 @@
# generated files
api.ts
vue/src/apps/*.js
vue/node_modules
staticfiles/
docs/reports/
/vue3/src/openapi/
# ignored files - prettier interferes with django templates and github actions
*.html
*.yml
*.yaml

7
.prettierrc Normal file
View File

@@ -0,0 +1,7 @@
{
"printWidth": 179,
"trailingComma": "es5",
"tabWidth": 2,
"semi": false,
"experimentalTernaries": true
}

21
.vscode/launch.json vendored
View File

@@ -4,7 +4,6 @@
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python Debugger: Django",
"type": "debugpy",
@@ -13,6 +12,22 @@
"args": ["runserver"],
"django": true,
"justMyCode": true
}
},
{
"name": "Python: Debug Tests",
"type": "debugpy",
"request": "launch",
"program": "${file}",
"purpose": [
"debug-test"
],
"console": "integratedTerminal",
"env": {
// coverage and pytest can't both be running at the same time
"PYTEST_ADDOPTS": "--no-cov"
},
"django": true,
"justMyCode": true
},
]
}
}

11
.vscode/settings.json vendored
View File

@@ -3,5 +3,12 @@
"cookbook/tests"
],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true
}
"python.testing.pytestEnabled": true,
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"[python]": {
"editor.defaultFormatter": "eeyore.yapf",
},
"yapf.args": [],
"isort.args": []
}

View File

@@ -6,6 +6,8 @@ RUN apk add --no-cache postgresql-libs postgresql-client gettext zlib libjpeg li
#Print all logs without buffering it.
ENV PYTHONUNBUFFERED 1
ENV DOCKER true
#This port will be used by gunicorn.
EXPOSE 8080

View File

@@ -71,7 +71,7 @@ Because of that there are several ways you can support us
- **Let us host for you** We are offering a [hosted version](https://app.tandoor.dev) where all profits support us and the development of tandoor (currently only available in germany).
## Contributing
Contributions are welcome but please read [this](https://docs.tandoor.dev/contribute/#contributing-code) **BEFORE** contributing anything!
Contributions are welcome but please read [this](https://docs.tandoor.dev/contribute/guidelines/) **BEFORE** contributing anything!
## Your Feedback

11
boot.sh
View File

@@ -67,7 +67,7 @@ echo "Migrating database"
python manage.py migrate
echo "Generating static files"
echo "Collecting static files, this may take a while..."
python manage.py collectstatic_js_reverse
python manage.py collectstatic --noinput
@@ -76,4 +76,11 @@ echo "Done"
chmod -R 755 /opt/recipes/mediafiles
exec gunicorn -b "[::]:$TANDOOR_PORT" --workers $GUNICORN_WORKERS --threads $GUNICORN_THREADS --access-logfile - --error-logfile - --log-level $GUNICORN_LOG_LEVEL recipes.wsgi
ipv6_disable=$(cat /sys/module/ipv6/parameters/disable)
# Check if IPv6 is enabled, only then run gunicorn with ipv6 support
if [ "$ipv6_disable" -eq 0 ]; then
exec gunicorn -b "[::]:$TANDOOR_PORT" --workers $GUNICORN_WORKERS --threads $GUNICORN_THREADS --access-logfile - --error-logfile - --log-level $GUNICORN_LOG_LEVEL recipes.wsgi
else
exec gunicorn -b ":$TANDOOR_PORT" --workers $GUNICORN_WORKERS --threads $GUNICORN_THREADS --access-logfile - --error-logfile - --log-level $GUNICORN_LOG_LEVEL recipes.wsgi
fi

View File

@@ -185,7 +185,7 @@ class StepAdmin(admin.ModelAdmin):
@admin.display(description="Name")
def recipe_and_name(obj):
if not obj.recipe_set.exists():
return f"Orphaned Step{'':s if not obj.name else f': {obj.name}'}"
return "Orphaned Step" + ('' if not obj.name else f': {obj.name}')
return f"{obj.recipe_set.first().name}: {obj.name}" if obj.name else obj.recipe_set.first().name
@@ -376,10 +376,17 @@ class ShareLinkAdmin(admin.ModelAdmin):
admin.site.register(ShareLink, ShareLinkAdmin)
@admin.action(description='Delete all properties with type')
def delete_properties_with_type(modeladmin, request, queryset):
for pt in queryset:
Property.objects.filter(property_type=pt).delete()
class PropertyTypeAdmin(admin.ModelAdmin):
search_fields = ('space',)
search_fields = ('name',)
list_display = ('id', 'space', 'name', 'fdc_id')
actions = [delete_properties_with_type]
admin.site.register(PropertyType, PropertyTypeAdmin)

View File

@@ -5,6 +5,7 @@ import threading
from asyncio import Task
from dataclasses import dataclass
from enum import Enum
from logging import Logger
from types import UnionType
from typing import List, Any, Dict, Optional, Type
@@ -39,10 +40,12 @@ class Work:
# 4. Work is marked as consumed, and next entry of the queue is consumed.
# Each 'Work' is processed in sequential by the worker, so the throughput is about [workers * the slowest connector]
class ConnectorManager:
_logger: Logger
_queue: queue.Queue
_listening_to_classes = REGISTERED_CLASSES | ConnectorConfig
def __init__(self):
self._logger = logging.getLogger("recipes.connector")
self._queue = queue.Queue(maxsize=settings.EXTERNAL_CONNECTORS_QUEUE_SIZE)
self._worker = threading.Thread(target=self.worker, args=(0, self._queue,), daemon=True)
self._worker.start()
@@ -65,7 +68,7 @@ class ConnectorManager:
try:
self._queue.put_nowait(Work(instance, action_type))
except queue.Full:
logging.info(f"queue was full, so skipping {action_type} of type {type(instance)}")
self._logger.info(f"queue was full, so skipping {action_type} of type {type(instance)}")
return
def stop(self):
@@ -74,10 +77,12 @@ class ConnectorManager:
@staticmethod
def worker(worker_id: int, worker_queue: queue.Queue):
logger = logging.getLogger("recipes.connector.worker")
loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)
logging.info(f"started ConnectionManager worker {worker_id}")
logger.info(f"started ConnectionManager worker {worker_id}")
# When multiple workers are used, please make sure the cache is shared across all threads, otherwise it might lead to un-expected behavior.
_connectors_cache: Dict[int, List[Connector]] = dict()
@@ -91,6 +96,8 @@ class ConnectorManager:
if item is None:
break
logger.debug(f"received {item.instance=} with {item.actionType=}")
# If a Connector was changed/updated, refresh connector from the database for said space
refresh_connector_cache = isinstance(item.instance, ConnectorConfig)
@@ -111,7 +118,7 @@ class ConnectorManager:
try:
connector: Optional[Connector] = ConnectorManager.get_connected_for_config(config)
except BaseException:
logging.exception(f"failed to initialize {config.name}")
logger.exception(f"failed to initialize {config.name}")
continue
if connector is not None:
@@ -123,10 +130,12 @@ class ConnectorManager:
worker_queue.task_done()
continue
logger.debug(f"running {len(connectors)} connectors for {item.instance=} with {item.actionType=}")
loop.run_until_complete(run_connectors(connectors, space, item.instance, item.actionType))
worker_queue.task_done()
logging.info(f"terminating ConnectionManager worker {worker_id}")
logger.info(f"terminating ConnectionManager worker {worker_id}")
asyncio.set_event_loop(None)
loop.close()

View File

@@ -1,26 +1,36 @@
import logging
from logging import Logger
from typing import Dict, Tuple
from urllib.parse import urljoin
from homeassistant_api import Client, HomeassistantAPIError, Domain
from aiohttp import ClientError, request
from cookbook.connectors.connector import Connector
from cookbook.models import ShoppingListEntry, ConnectorConfig, Space
class HomeAssistant(Connector):
_domains_cache: dict[str, Domain]
_config: ConnectorConfig
_logger: Logger
_client: Client
def __init__(self, config: ConnectorConfig):
if not config.token or not config.url or not config.todo_entity:
raise ValueError("config for HomeAssistantConnector in incomplete")
self._domains_cache = dict()
self._logger = logging.getLogger(f"recipes.connector.homeassistant.{config.name}")
if config.url[-1] != "/":
config.url += "/"
self._config = config
self._logger = logging.getLogger("connector.HomeAssistant")
self._client = Client(self._config.url, self._config.token, async_cache_session=False, use_async=True)
async def homeassistant_api_call(self, method: str, path: str, data: Dict) -> str:
headers = {
"Authorization": f"Bearer {self._config.token}",
"Content-Type": "application/json"
}
async with request(method, urljoin(self._config.url, path), headers=headers, json=data) as response:
response.raise_for_status()
return await response.json()
async def on_shopping_list_entry_created(self, space: Space, shopping_list_entry: ShoppingListEntry) -> None:
if not self._config.on_shopping_list_entry_created_enabled:
@@ -28,16 +38,18 @@ class HomeAssistant(Connector):
item, description = _format_shopping_list_entry(shopping_list_entry)
todo_domain = self._domains_cache.get('todo')
try:
if todo_domain is None:
todo_domain = await self._client.async_get_domain('todo')
self._domains_cache['todo'] = todo_domain
self._logger.debug(f"adding {item=}")
logging.debug(f"pushing {item} to {self._config.name}")
await todo_domain.add_item(entity_id=self._config.todo_entity, item=item)
except HomeassistantAPIError as err:
self._logger.warning(f"[HomeAssistant {self._config.name}] Received an exception from the api: {err=}, {type(err)=}")
data = {
"entity_id": self._config.todo_entity,
"item": item,
"description": description,
}
try:
await self.homeassistant_api_call("POST", "services/todo/add_item", data)
except ClientError as err:
self._logger.warning(f"received an exception from the api: {err=}, {type(err)=}")
async def on_shopping_list_entry_updated(self, space: Space, shopping_list_entry: ShoppingListEntry) -> None:
if not self._config.on_shopping_list_entry_updated_enabled:
@@ -48,24 +60,31 @@ class HomeAssistant(Connector):
if not self._config.on_shopping_list_entry_deleted_enabled:
return
item, description = _format_shopping_list_entry(shopping_list_entry)
if not hasattr(shopping_list_entry._state.fields_cache, "food"):
# Sometimes the food foreign key is not loaded, and we cant load it from an async process
self._logger.debug("required property was not present in ShoppingListEntry")
return
item, _ = _format_shopping_list_entry(shopping_list_entry)
self._logger.debug(f"removing {item=}")
data = {
"entity_id": self._config.todo_entity,
"item": item,
}
todo_domain = self._domains_cache.get('todo')
try:
if todo_domain is None:
todo_domain = await self._client.async_get_domain('todo')
self._domains_cache['todo'] = todo_domain
logging.debug(f"deleting {item} from {self._config.name}")
await todo_domain.remove_item(entity_id=self._config.todo_entity, item=item)
except HomeassistantAPIError as err:
self._logger.warning(f"[HomeAssistant {self._config.name}] Received an exception from the api: {err=}, {type(err)=}")
await self.homeassistant_api_call("POST", "services/todo/remove_item", data)
except ClientError as err:
# This error will always trigger if the item is not present/found
self._logger.debug(f"received an exception from the api: {err=}, {type(err)=}")
async def close(self) -> None:
await self._client.async_cache_session.close()
pass
def _format_shopping_list_entry(shopping_list_entry: ShoppingListEntry):
def _format_shopping_list_entry(shopping_list_entry: ShoppingListEntry) -> Tuple[str, str]:
item = shopping_list_entry.food.name
if shopping_list_entry.amount > 0:
item += f" ({shopping_list_entry.amount:.2f}".rstrip('0').rstrip('.')
@@ -76,10 +95,10 @@ def _format_shopping_list_entry(shopping_list_entry: ShoppingListEntry):
else:
item += ")"
description = "Imported by TandoorRecipes"
description = "From TandoorRecipes"
if shopping_list_entry.created_by.first_name and len(shopping_list_entry.created_by.first_name) > 0:
description += f", created by {shopping_list_entry.created_by.first_name}"
description += f", by {shopping_list_entry.created_by.first_name}"
else:
description += f", created by {shopping_list_entry.created_by.username}"
description += f", by {shopping_list_entry.created_by.username}"
return item, description

View File

@@ -1,8 +0,0 @@
from django.test.runner import DiscoverRunner
from django_scopes import scopes_disabled
class CustomTestRunner(DiscoverRunner):
def run_tests(self, *args, **kwargs):
with scopes_disabled():
return super().run_tests(*args, **kwargs)

View File

@@ -1,4 +1,12 @@
import socket
from urllib.parse import urlparse
from django.core.exceptions import ValidationError
from django.core.validators import URLValidator
from django.db.models import Func
from ipaddress import ip_address
from recipes import settings
class Round(Func):
@@ -11,3 +19,30 @@ def str2bool(v):
return v
else:
return v.lower() in ("yes", "true", "1")
"""
validates an url that is supposed to be imported
checks that the protocol used is http(s) and that no local address is accessed
@:param url to test
@:return true if url is valid, false otherwise
"""
def validate_import_url(url):
try:
validator = URLValidator(schemes=['http', 'https'])
validator(url)
except ValidationError:
# if schema is not http or https, consider url invalid
return False
# resolve IP address of url
try:
url_ip_address = ip_address(str(socket.gethostbyname(urlparse(url).hostname)))
except (ValueError, AttributeError, TypeError, Exception) as e:
# if ip cannot be parsed, consider url invalid
return False
# validate that IP is neither private nor any other special address
return not any([url_ip_address.is_private, url_ip_address.is_reserved, url_ip_address.is_loopback, url_ip_address.is_multicast, url_ip_address.is_link_local, ])

View File

@@ -71,7 +71,7 @@ class FoodPropertyHelper:
# TODO move to central helper ? --> use defaultdict
@staticmethod
def add_or_create(d, key, value, food):
if key in d:
if key in d and d[key]['value']:
d[key]['value'] += value
else:
d[key] = {'id': food.id, 'food': food.name, 'value': value}

View File

@@ -15,12 +15,9 @@ from cookbook.models import Automation, Keyword, PropertyType
def get_from_scraper(scrape, request):
# converting the scrape_me object to the existing json format based on ld+json
# converting the scrape_html object to the existing json format based on ld+json
recipe_json = {
'steps': [],
'internal': True
}
recipe_json = {'steps': [], 'internal': True}
keywords = []
# assign source URL
@@ -157,11 +154,18 @@ def get_from_scraper(scrape, request):
# assign steps
try:
for i in parse_instructions(scrape.instructions()):
recipe_json['steps'].append({'instruction': i, 'ingredients': [], 'show_ingredients_table': request.user.userpreference.show_step_ingredients, })
recipe_json['steps'].append({
'instruction': i,
'ingredients': [],
'show_ingredients_table': request.user.userpreference.show_step_ingredients,
})
except Exception:
pass
if len(recipe_json['steps']) == 0:
recipe_json['steps'].append({'instruction': '', 'ingredients': [], })
recipe_json['steps'].append({
'instruction': '',
'ingredients': [],
})
recipe_json['description'] = recipe_json['description'][:512]
if len(recipe_json['description']) > 256: # split at 256 as long descriptions don't look good on recipe cards
@@ -182,20 +186,20 @@ def get_from_scraper(scrape, request):
'original_text': x
}
if unit:
ingredient['unit'] = {'name': unit, }
ingredient['unit'] = {
'name': unit,
}
recipe_json['steps'][0]['ingredients'].append(ingredient)
except Exception:
recipe_json['steps'][0]['ingredients'].append(
{
'amount': 0,
'unit': None,
'food': {
'name': x,
},
'note': '',
'original_text': x
}
)
recipe_json['steps'][0]['ingredients'].append({
'amount': 0,
'unit': None,
'food': {
'name': x,
},
'note': '',
'original_text': x
})
except Exception:
pass
@@ -248,14 +252,16 @@ def get_from_youtube_scraper(url, request):
'working_time': 0,
'waiting_time': 0,
'image': "",
'keywords': [{'name': kw.name, 'label': kw.name, 'id': kw.pk}],
'keywords': [{
'name': kw.name,
'label': kw.name,
'id': kw.pk
}],
'source_url': url,
'steps': [
{
'ingredients': [],
'instruction': ''
}
]
'steps': [{
'ingredients': [],
'instruction': ''
}]
}
try:
@@ -367,8 +373,8 @@ def parse_servings(servings):
servings = 1
elif isinstance(servings, list):
try:
servings = int(re.findall(r'\b\d+\b', servings[0])[0])
except KeyError:
servings = int(re.findall(r'\b\d+\b', str(servings[0]))[0])
except (KeyError, IndexError):
servings = 1
return servings
@@ -452,10 +458,7 @@ def normalize_string(string):
def iso_duration_to_minutes(string):
match = re.match(
r'P((?P<years>\d+)Y)?((?P<months>\d+)M)?((?P<weeks>\d+)W)?((?P<days>\d+)D)?T((?P<hours>\d+)H)?((?P<minutes>\d+)M)?((?P<seconds>\d+)S)?',
string
).groupdict()
match = re.match(r'P((?P<years>\d+)Y)?((?P<months>\d+)M)?((?P<weeks>\d+)W)?((?P<days>\d+)D)?T((?P<hours>\d+)H)?((?P<minutes>\d+)M)?((?P<seconds>\d+)S)?', string).groupdict()
return int(match['days'] or 0) * 24 * 60 + int(match['hours'] or 0) * 60 + int(match['minutes'] or 0)

View File

@@ -1,68 +0,0 @@
import json
from recipe_scrapers._abstract import AbstractScraper
class CooksIllustrated(AbstractScraper):
@classmethod
def host(cls, site='cooksillustrated'):
return {
'cooksillustrated': f"{site}.com",
'americastestkitchen': f"{site}.com",
'cookscountry': f"{site}.com",
}.get(site)
def title(self):
return self.schema.title()
def image(self):
return self.schema.image()
def total_time(self):
if not self.recipe:
self.get_recipe()
return self.recipe['recipeTimeNote']
def yields(self):
if not self.recipe:
self.get_recipe()
return self.recipe['yields']
def ingredients(self):
if not self.recipe:
self.get_recipe()
ingredients = []
for group in self.recipe['ingredientGroups']:
ingredients += group['fields']['recipeIngredientItems']
return [
"{} {} {}{}".format(
i['fields']['qty'] or '',
i['fields']['measurement'] or '',
i['fields']['ingredient']['fields']['title'] or '',
i['fields']['postText'] or ''
)
for i in ingredients
]
def instructions(self):
if not self.recipe:
self.get_recipe()
if self.recipe.get('headnote', False):
i = ['Note: ' + self.recipe.get('headnote', '')]
else:
i = []
return "\n".join(
i
+ [self.recipe.get('whyThisWorks', '')]
+ [
instruction['fields']['content']
for instruction in self.recipe['instructions']
]
)
def nutrients(self):
raise NotImplementedError("This should be implemented.")
def get_recipe(self):
j = json.loads(self.soup.find(type='application/json').string)
name = list(j['props']['initialState']['content']['documents'])[0]
self.recipe = j['props']['initialState']['content']['documents'][name]

View File

@@ -1,43 +0,0 @@
from json import JSONDecodeError
from bs4 import BeautifulSoup
from recipe_scrapers import SCRAPERS, get_host_name
from recipe_scrapers._factory import SchemaScraperFactory
from recipe_scrapers._schemaorg import SchemaOrg
from .cooksillustrated import CooksIllustrated
CUSTOM_SCRAPERS = {
CooksIllustrated.host(site="cooksillustrated"): CooksIllustrated,
CooksIllustrated.host(site="americastestkitchen"): CooksIllustrated,
CooksIllustrated.host(site="cookscountry"): CooksIllustrated,
}
SCRAPERS.update(CUSTOM_SCRAPERS)
def text_scraper(text, url=None):
domain = None
if url:
domain = get_host_name(url)
if domain in SCRAPERS:
scraper_class = SCRAPERS[domain]
else:
scraper_class = SchemaScraperFactory.SchemaScraper
class TextScraper(scraper_class):
def __init__(
self,
html=None,
url=None,
):
self.wild_mode = False
self.meta_http_equiv = False
self.soup = BeautifulSoup(html, "html.parser")
self.url = url
self.recipe = None
try:
self.schema = SchemaOrg(html)
except (JSONDecodeError, AttributeError):
pass
return TextScraper(url=url, html=text)

View File

@@ -20,6 +20,7 @@ CONVERSION_TABLE = {
'gallon': 0.264172,
'tbsp': 67.628,
'tsp': 202.884,
'us_cup': 4.22675,
'imperial_fluid_ounce': 35.1951,
'imperial_pint': 1.75975,
'imperial_quart': 0.879877,

View File

@@ -2,12 +2,12 @@ import re
from io import BytesIO
import requests
import validators
from cookbook.helper.HelperFunctions import validate_import_url
from cookbook.helper.ingredient_parser import IngredientParser
from cookbook.helper.recipe_url_import import (get_from_scraper, get_images_from_soup,
iso_duration_to_minutes)
from cookbook.helper.scrapers.scrapers import text_scraper
from recipe_scrapers import scrape_html
from cookbook.integration.integration import Integration
from cookbook.models import Ingredient, Recipe, Step
@@ -20,7 +20,7 @@ class CookBookApp(Integration):
def get_recipe_from_file(self, file):
recipe_html = file.getvalue().decode("utf-8")
scrape = text_scraper(text=recipe_html)
scrape = scrape_html(html=recipe_html, org_url="https://cookbookapp.import", supported_only=False)
recipe_json = get_from_scraper(scrape, self.request)
images = list(dict.fromkeys(get_images_from_soup(scrape.soup, None)))
@@ -63,7 +63,7 @@ class CookBookApp(Integration):
if len(images) > 0:
try:
url = images[0]
if validators.url(url, public=True):
if validate_import_url(url):
response = requests.get(url)
self.import_recipe_image(recipe, BytesIO(response.content))
except Exception as e:

View File

@@ -1,8 +1,8 @@
from io import BytesIO
import requests
import validators
from cookbook.helper.HelperFunctions import validate_import_url
from cookbook.helper.ingredient_parser import IngredientParser
from cookbook.helper.recipe_url_import import parse_servings, parse_servings_text, parse_time
from cookbook.integration.integration import Integration
@@ -69,7 +69,7 @@ class Cookmate(Integration):
if recipe_xml.find('imageurl') is not None:
try:
url = recipe_xml.find('imageurl').text.strip()
if validators.url(url, public=True):
if validate_import_url(url):
response = requests.get(url)
self.import_recipe_image(recipe, BytesIO(response.content))
except Exception as e:

View File

@@ -60,20 +60,20 @@ class NextcloudCookbook(Integration):
step = Step.objects.create(
instruction=s, space=self.request.space, show_ingredients_table=self.request.user.userpreference.show_step_ingredients,
)
if not ingredients_added:
if len(recipe_json['description'].strip()) > 500:
step.instruction = recipe_json['description'].strip() + '\n\n' + step.instruction
ingredients_added = True
ingredient_parser = IngredientParser(self.request, True)
ingredient_parser = IngredientParser(self.request, True)
if ingredients_added == False:
for ingredient in recipe_json['recipeIngredient']:
amount, unit, food, note = ingredient_parser.parse(ingredient)
f = ingredient_parser.get_food(food)
u = ingredient_parser.get_unit(unit)
step.ingredients.add(Ingredient.objects.create(
food=f, unit=u, amount=amount, note=note, original_text=ingredient, space=self.request.space,
))
ingredients_added = True
if ingredient.startswith('##'):
subheader = ingredient.replace('##', '', 1)
step.ingredients.add(Ingredient.objects.create(note=subheader, is_header=True, no_amount=True, space=self.request.space))
else:
amount, unit, food, note = ingredient_parser.parse(ingredient)
f = ingredient_parser.get_food(food)
u = ingredient_parser.get_unit(unit)
step.ingredients.add(Ingredient.objects.create(
food=f, unit=u, amount=amount, note=note, original_text=ingredient, space=self.request.space,))
recipe.steps.add(step)
if 'nutrition' in recipe_json:

View File

@@ -6,8 +6,8 @@ from gettext import gettext as _
from io import BytesIO
import requests
import validators
from cookbook.helper.HelperFunctions import validate_import_url
from cookbook.helper.ingredient_parser import IngredientParser
from cookbook.helper.recipe_url_import import parse_servings, parse_servings_text
from cookbook.integration.integration import Integration
@@ -87,7 +87,7 @@ class Paprika(Integration):
try:
if recipe_json.get("image_url", None):
url = recipe_json.get("image_url", None)
if validators.url(url, public=True):
if validate_import_url(url):
response = requests.get(url)
self.import_recipe_image(recipe, BytesIO(response.content))
except Exception:

View File

@@ -1,9 +1,10 @@
from io import BytesIO
import requests
import validators
from cookbook.helper.HelperFunctions import validate_import_url
from cookbook.helper.ingredient_parser import IngredientParser
from cookbook.helper.recipe_url_import import parse_servings, parse_servings_text, parse_time
from cookbook.integration.integration import Integration
from cookbook.models import Ingredient, Keyword, Recipe, Step
@@ -18,32 +19,38 @@ class Plantoeat(Integration):
tags = None
ingredients = []
directions = []
description = ''
fields = {}
for line in file.replace('\r', '').split('\n'):
if line.strip() != '':
if 'Title:' in line:
title = line.replace('Title:', '').replace('"', '').strip()
fields['name'] = line.replace('Title:', '').replace('"', '').strip()
if 'Description:' in line:
description = line.replace('Description:', '').strip()
if 'Source:' in line or 'Serves:' in line or 'Prep Time:' in line or 'Cook Time:' in line:
directions.append(line.strip() + '\n')
fields['description'] = line.replace('Description:', '').strip()
if 'Serves:' in line:
fields['servings'] = parse_servings(line.replace('Serves:', '').strip())
if 'Source:' in line:
fields['source_url'] = line.replace('Source:', '').strip()
if 'Photo Url:' in line:
image_url = line.replace('Photo Url:', '').strip()
if 'Prep Time:' in line:
fields['working_time'] = parse_time(line.replace('Prep Time:', '').strip())
if 'Cook Time:' in line:
fields['waiting_time'] = parse_time(line.replace('Cook Time:', '').strip())
if 'Tags:' in line:
tags = line.replace('Tags:', '').strip()
if ingredient_mode:
if len(line) > 2 and 'Instructions:' not in line:
ingredients.append(line.strip())
if direction_mode:
if len(line) > 2:
directions.append(line.strip() + '\n')
if 'Ingredients:' in line:
ingredient_mode = True
if 'Directions:' in line:
ingredient_mode = False
direction_mode = True
if ingredient_mode:
if len(line) > 2 and 'Ingredients:' not in line:
ingredients.append(line.strip())
if direction_mode:
if len(line) > 2:
directions.append(line.strip() + '\n')
recipe = Recipe.objects.create(name=title, description=description, created_by=self.request.user, internal=True, space=self.request.space)
recipe = Recipe.objects.create(**fields, created_by=self.request.user, internal=True, space=self.request.space)
step = Step.objects.create(
instruction='\n'.join(directions) + '\n\n', space=self.request.space, show_ingredients_table=self.request.user.userpreference.show_step_ingredients,
@@ -68,7 +75,7 @@ class Plantoeat(Integration):
if image_url:
try:
if validators.url(image_url, public=True):
if validate_import_url(image_url):
response = requests.get(image_url)
self.import_recipe_image(recipe, BytesIO(response.content))
except Exception as e:

View File

@@ -5,9 +5,10 @@ from io import BytesIO
from zipfile import ZipFile
import requests
import validators
from django.utils.translation import gettext as _
from cookbook.helper.HelperFunctions import validate_import_url
from cookbook.helper.image_processing import get_filetype
from cookbook.helper.ingredient_parser import IngredientParser
from cookbook.integration.integration import Integration
@@ -125,7 +126,7 @@ class RecetteTek(Integration):
else:
if file['originalPicture'] != '':
url = file['originalPicture']
if validators.url(url, public=True):
if validate_import_url(url):
response = requests.get(url)
if imghdr.what(BytesIO(response.content)) is not None:
self.import_recipe_image(recipe, BytesIO(response.content), filetype=get_filetype(file['originalPicture']))

View File

@@ -2,8 +2,8 @@ import json
from io import BytesIO
import requests
import validators
from cookbook.helper.HelperFunctions import validate_import_url
from cookbook.helper.ingredient_parser import IngredientParser
from cookbook.helper.recipe_url_import import parse_servings, parse_servings_text, parse_time
from cookbook.integration.integration import Integration
@@ -56,7 +56,7 @@ class RecipeSage(Integration):
if len(file['image']) > 0:
try:
url = file['image'][0]
if validators.url(url, public=True):
if validate_import_url(url):
response = requests.get(url)
self.import_recipe_image(recipe, BytesIO(response.content))
except Exception as e:

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,18 @@
# Generated by Django 4.2.10 on 2024-03-09 06:41
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('cookbook', '0216_delete_shoppinglist'),
]
operations = [
migrations.AlterField(
model_name='userpreference',
name='default_page',
field=models.CharField(choices=[('SEARCH', 'Search'), ('PLAN', 'Meal-Plan'), ('BOOKS', 'Books'), ('SHOPPING', 'Shopping')], default='SEARCH', max_length=64),
),
]

View File

@@ -0,0 +1,46 @@
# Generated by Django 4.2.11 on 2024-05-01 10:56
from datetime import timedelta
from django.db import migrations, models
from django_scopes import scopes_disabled
def timezone_correction(apps, schema_editor):
# when converting from date to datetime the field becomes timezone aware and defaults to 00:00:00 UTC
# this will be converted to a local datetime on the client which, for all negative offset timezones,
# would mean that the plan item shows one day prior to the previous planning date
# by setting the time on the old entries to 11:00 this issue will be limited to a very small number of people (see https://en.wikipedia.org/wiki/Time_zone#/media/File:World_Time_Zones_Map.svg)
# the server timezone could be used to guess zone of most of the clients but that would also not be perfect so this much simpler alternative is chosen
with scopes_disabled():
MealPlan = apps.get_model('cookbook', 'MealPlan')
meal_plans = MealPlan.objects.all()
for mp in meal_plans:
mp.from_date += timedelta(hours=12)
mp.to_date += timedelta(hours=12)
MealPlan.objects.bulk_update(meal_plans, ['from_date', 'to_date'], batch_size=1000)
class Migration(migrations.Migration):
dependencies = [
('cookbook', '0217_alter_userpreference_default_page'),
]
operations = [
migrations.AddField(
model_name='mealtype',
name='time',
field=models.TimeField(blank=True, null=True),
),
migrations.AlterField(
model_name='mealplan',
name='from_date',
field=models.DateTimeField(),
),
migrations.AlterField(
model_name='mealplan',
name='to_date',
field=models.DateTimeField(),
),
migrations.RunPython(timezone_correction)
]

View File

@@ -417,7 +417,6 @@ class ConnectorConfig(models.Model, PermissionModelMixin):
objects = ScopedManager(space='space')
class UserPreference(models.Model, PermissionModelMixin):
# Themes
BOOTSTRAP = 'BOOTSTRAP'
@@ -449,11 +448,13 @@ class UserPreference(models.Model, PermissionModelMixin):
SEARCH = 'SEARCH'
PLAN = 'PLAN'
BOOKS = 'BOOKS'
SHOPPING = 'SHOPPING'
PAGES = (
(SEARCH, _('Search')),
(PLAN, _('Meal-Plan')),
(BOOKS, _('Books')),
(SHOPPING, _('Shopping')),
)
user = AutoOneToOneField(User, on_delete=models.CASCADE, primary_key=True)
@@ -1133,6 +1134,7 @@ class MealType(models.Model, PermissionModelMixin):
name = models.CharField(max_length=128)
order = models.IntegerField(default=0)
color = models.CharField(max_length=7, blank=True, null=True)
time = models.TimeField(null=True, blank=True)
default = models.BooleanField(default=False, blank=True)
created_by = models.ForeignKey(User, on_delete=models.CASCADE)
@@ -1156,8 +1158,8 @@ class MealPlan(ExportModelOperationsMixin('meal_plan'), models.Model, Permission
shared = models.ManyToManyField(User, blank=True, related_name='plan_share')
meal_type = models.ForeignKey(MealType, on_delete=models.CASCADE)
note = models.TextField(blank=True)
from_date = models.DateField()
to_date = models.DateField()
from_date = models.DateTimeField()
to_date = models.DateTimeField()
space = models.ForeignKey(Space, on_delete=models.CASCADE)
objects = ScopedManager(space='space')

View File

@@ -4,8 +4,8 @@ import os
from datetime import datetime
import requests
import validators
from cookbook.helper.HelperFunctions import validate_import_url
from cookbook.models import Recipe, RecipeImport, SyncLog
from cookbook.provider.provider import Provider
@@ -107,7 +107,7 @@ class Dropbox(Provider):
recipe.save()
url = recipe.link.replace('www.dropbox.', 'dl.dropboxusercontent.')
if validators.url(url, public=True):
if validate_import_url(url):
response = requests.get(url)
return io.BytesIO(response.content)

View File

@@ -4,8 +4,9 @@ import tempfile
from datetime import datetime
import requests
import validators
import webdav3.client as wc
from cookbook.helper.HelperFunctions import validate_import_url
from cookbook.models import Recipe, RecipeImport, SyncLog
from cookbook.provider.provider import Provider
from requests.auth import HTTPBasicAuth
@@ -93,7 +94,7 @@ class Nextcloud(Provider):
"Content-Type": "application/json"
}
if validators.url(url, public=True):
if validate_import_url(url):
r = requests.get(
url,
headers=headers,

View File

@@ -355,7 +355,7 @@ class MealTypeSerializer(SpacedModelSerializer, WritableNestedModelSerializer):
class Meta:
list_serializer_class = SpaceFilterSerializer
model = MealType
fields = ('id', 'name', 'order', 'color', 'default', 'created_by')
fields = ('id', 'name', 'order', 'time', 'color', 'default', 'created_by')
read_only_fields = ('created_by',)
@@ -1030,7 +1030,7 @@ class MealPlanSerializer(SpacedModelSerializer, WritableNestedModelSerializer):
shared = UserSerializer(many=True, required=False, allow_null=True)
shopping = serializers.SerializerMethodField('in_shopping')
to_date = serializers.DateField(required=False)
to_date = serializers.DateTimeField(required=False)
def get_note_markdown(self, obj):
return markdown(obj.note)

View File

@@ -4,7 +4,7 @@
{% load custom_tags %}
{% theme_values request as theme_values %}
<!DOCTYPE html>
<html>
<head>
<title>{% block title %}

View File

@@ -82,6 +82,17 @@
{% else %}
{% trans 'Everything is fine!' %}
{% endif %}
<h4 class="mt-3">{% trans 'Allowed Hosts' %} <span
class="badge badge-{% if '*' in allowed_hosts %}warning{% else %}success{% endif %}">{% if '*' in allowed_hosts %}
{% trans 'Warning' %}{% else %}{% trans 'Ok' %}{% endif %}</span></h4>
{% if debug %}
{% blocktrans %}
Your allowed hosts are configured to allow every host. This might be ok in some setups but should be avoided. Please see the docs about this.
{% endblocktrans %}
{% else %}
{% trans 'Everything is fine!' %}
{% endif %}
<h4 class="mt-3">{% trans 'Database' %}
<span class="badge badge-{{ postgres_status }}">

View File

@@ -0,0 +1,319 @@
body {
font-family: Helvetica, Arial, sans-serif;
font-size: 12px;
/* do not increase min-width as some may use split screens */
min-width: 800px;
color: #999;
}
h1 {
font-size: 24px;
color: black;
}
h2 {
font-size: 16px;
color: black;
}
p {
color: black;
}
a {
color: #999;
}
table {
border-collapse: collapse;
}
/******************************
* SUMMARY INFORMATION
******************************/
#environment td {
padding: 5px;
border: 1px solid #e6e6e6;
vertical-align: top;
}
#environment tr:nth-child(odd) {
background-color: #f6f6f6;
}
#environment ul {
margin: 0;
padding: 0 20px;
}
/******************************
* TEST RESULT COLORS
******************************/
span.passed,
.passed .col-result {
color: green;
}
span.skipped,
span.xfailed,
span.rerun,
.skipped .col-result,
.xfailed .col-result,
.rerun .col-result {
color: orange;
}
span.error,
span.failed,
span.xpassed,
.error .col-result,
.failed .col-result,
.xpassed .col-result {
color: red;
}
.col-links__extra {
margin-right: 3px;
}
/******************************
* RESULTS TABLE
*
* 1. Table Layout
* 2. Extra
* 3. Sorting items
*
******************************/
/*------------------
* 1. Table Layout
*------------------*/
#results-table {
border: 1px solid #e6e6e6;
color: #999;
font-size: 12px;
width: 100%;
}
#results-table th,
#results-table td {
padding: 5px;
border: 1px solid #e6e6e6;
text-align: left;
}
#results-table th {
font-weight: bold;
}
/*------------------
* 2. Extra
*------------------*/
.logwrapper {
max-height: 230px;
overflow-y: scroll;
background-color: #e6e6e6;
}
.logwrapper.expanded {
max-height: none;
}
.logwrapper.expanded .logexpander:after {
content: "collapse [-]";
}
.logwrapper .logexpander {
z-index: 1;
position: sticky;
top: 10px;
width: max-content;
border: 1px solid;
border-radius: 3px;
padding: 5px 7px;
margin: 10px 0 10px calc(100% - 80px);
cursor: pointer;
background-color: #e6e6e6;
}
.logwrapper .logexpander:after {
content: "expand [+]";
}
.logwrapper .logexpander:hover {
color: #000;
border-color: #000;
}
.logwrapper .log {
min-height: 40px;
position: relative;
top: -50px;
height: calc(100% + 50px);
border: 1px solid #e6e6e6;
color: black;
display: block;
font-family: "Courier New", Courier, monospace;
padding: 5px;
padding-right: 80px;
white-space: pre-wrap;
}
div.media {
border: 1px solid #e6e6e6;
float: right;
height: 240px;
margin: 0 5px;
overflow: hidden;
width: 320px;
}
.media-container {
display: grid;
grid-template-columns: 25px auto 25px;
align-items: center;
flex: 1 1;
overflow: hidden;
height: 200px;
}
.media-container--fullscreen {
grid-template-columns: 0px auto 0px;
}
.media-container__nav--right,
.media-container__nav--left {
text-align: center;
cursor: pointer;
}
.media-container__viewport {
cursor: pointer;
text-align: center;
height: inherit;
}
.media-container__viewport img,
.media-container__viewport video {
object-fit: cover;
width: 100%;
max-height: 100%;
}
.media__name,
.media__counter {
display: flex;
flex-direction: row;
justify-content: space-around;
flex: 0 0 25px;
align-items: center;
}
.collapsible td:not(.col-links) {
cursor: pointer;
}
.collapsible td:not(.col-links):hover::after {
color: #bbb;
font-style: italic;
cursor: pointer;
}
.col-result {
width: 130px;
}
.col-result:hover::after {
content: " (hide details)";
}
.col-result.collapsed:hover::after {
content: " (show details)";
}
#environment-header h2:hover::after {
content: " (hide details)";
color: #bbb;
font-style: italic;
cursor: pointer;
font-size: 12px;
}
#environment-header.collapsed h2:hover::after {
content: " (show details)";
color: #bbb;
font-style: italic;
cursor: pointer;
font-size: 12px;
}
/*------------------
* 3. Sorting items
*------------------*/
.sortable {
cursor: pointer;
}
.sortable.desc:after {
content: " ";
position: relative;
left: 5px;
bottom: -12.5px;
border: 10px solid #4caf50;
border-bottom: 0;
border-left-color: transparent;
border-right-color: transparent;
}
.sortable.asc:after {
content: " ";
position: relative;
left: 5px;
bottom: 12.5px;
border: 10px solid #4caf50;
border-top: 0;
border-left-color: transparent;
border-right-color: transparent;
}
.hidden, .summary__reload__button.hidden {
display: none;
}
.summary__data {
flex: 0 0 550px;
}
.summary__reload {
flex: 1 1;
display: flex;
justify-content: center;
}
.summary__reload__button {
flex: 0 0 300px;
display: flex;
color: white;
font-weight: bold;
background-color: #4caf50;
text-align: center;
justify-content: center;
align-items: center;
border-radius: 3px;
cursor: pointer;
}
.summary__reload__button:hover {
background-color: #46a049;
}
.summary__spacer {
flex: 0 0 550px;
}
.controls {
display: flex;
justify-content: space-between;
}
.filters,
.collapse {
display: flex;
align-items: center;
}
.filters button,
.collapse button {
color: #999;
border: none;
background: none;
cursor: pointer;
text-decoration: underline;
}
.filters button:hover,
.collapse button:hover {
color: #ccc;
}
.filter__label {
margin-right: 10px;
}

Some files were not shown because too many files have changed in this diff Show More