Compare commits

...

652 Commits
1.1.4 ... 1.4.1

Author SHA1 Message Date
vabene1111
12491d1302 changed gunicorn default settings 2022-09-21 20:17:00 +02:00
vabene1111
b7a4613310 Merge pull request #2052 from Szeraax/patch-1
Update boot.sh
2022-09-21 20:16:25 +02:00
Szeraax
39f5fca89b Update boot.sh
Set default value to 1 if null or unset for gunicorn workers/threads.
2022-09-21 11:06:55 -06:00
vabene1111
b49393357a fixed tests 2022-09-21 16:54:41 +02:00
vabene1111
cc1a69eac0 fixed cache key uniqueness even in tests 2022-09-21 16:28:54 +02:00
vabene1111
13d498658c fixed DB setting 2022-09-19 07:34:26 +02:00
vabene1111
cad93b2dd1 equal button styling in editor 2022-09-19 07:32:51 +02:00
vabene1111
f0b8bac221 improved loading animation 2022-09-19 07:31:57 +02:00
vabene1111
13ef843edb fixed sort dropdown visibility 2022-09-19 07:28:20 +02:00
vabene1111
902ef3cd1e downgrade django to fix DRF 2022-09-19 07:13:22 +02:00
vabene1111
0b69bcddcc downgrade django to fix DRF 2022-09-19 07:13:09 +02:00
vabene1111
9089fc7ad3 fixed admin userspace search 2022-09-17 08:49:00 +02:00
vabene1111
6d866ae62b fixed keyword serialization 2022-09-17 08:43:18 +02:00
vabene1111
9fa82c2ddb something broke with md, dont want to fix right now 2022-09-17 08:43:10 +02:00
vabene1111
0ca29cd677 small visual tweaks to search page 2022-09-17 08:06:38 +02:00
vabene1111
54c9e200a0 Merge pull request #2044 from ambroisie/fix/markdown_md_globals_deprecated
Fix 'markdown' 3.4 version incompatibility
2022-09-17 07:14:03 +02:00
vabene1111
fc67525dcb Merge pull request #1969 from TandoorRecipes/dependabot/pip/markdown-3.4.1
Bump markdown from 3.3.7 to 3.4.1
2022-09-17 07:13:54 +02:00
Bruno BELANYI
37e292cab9 Fix 'markdown' 3.4 version incompatibility 2022-09-16 19:11:52 +02:00
vabene1111
e391abd23d moved annotation to default query manager 2022-09-16 18:18:59 +02:00
vabene1111
947986277a fixed recipe detail query 2022-09-16 18:15:05 +02:00
vabene1111
b2a10f269c permission and search preference caching 2022-09-16 14:35:35 +02:00
vabene1111
dc076d25d6 improved hash generation time 2022-09-16 13:31:00 +02:00
vabene1111
845408244b optimized recipe search query annotation performance 2022-09-16 13:24:57 +02:00
vabene1111
e06c82297d added loading animation to main search page 2022-09-15 20:53:22 +02:00
vabene1111
459be74a7c changed local DB setting 2022-09-15 19:05:46 +02:00
vabene1111
37e81275b5 align dependencies with oauth toolkit 2022-09-15 18:37:15 +02:00
vabene1111
8417b0ec3f Merge branch 'develop' of https://github.com/vabene1111/recipes into develop
# Conflicts:
#	recipes/settings.py
2022-09-15 18:31:46 +02:00
vabene1111
7d834ee088 debug toobar stuff 2022-09-15 18:31:30 +02:00
vabene1111
eb119b7443 remove "favorite" as default sort order due to performacne issues 2022-09-15 18:31:22 +02:00
vabene1111
cc342cbae3 add community contributed to HA docs and link to alexbelgium directly on top 2022-09-12 20:06:12 +02:00
vabene1111
75ae26fd28 Merge pull request #2032 from alexbelgium/develop
Home Assistant documentation
2022-09-12 20:00:31 +02:00
vabene1111
94f58f4608 Merge pull request #2029 from TandoorRecipes/dependabot/pip/django-4.1.1
Bump django from 4.0.7 to 4.1.1
2022-09-12 19:59:37 +02:00
vabene1111
5478a8d49a Merge pull request #2036 from TandoorRecipes/dependabot/pip/recipe-scrapers-14.14.0
Bump recipe-scrapers from 14.11.0 to 14.14.0
2022-09-12 19:59:26 +02:00
dependabot[bot]
23180622e8 Bump django from 4.0.7 to 4.1.1
Bumps [django](https://github.com/django/django) from 4.0.7 to 4.1.1.
- [Release notes](https://github.com/django/django/releases)
- [Commits](https://github.com/django/django/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-12 15:59:22 +00:00
dependabot[bot]
62187fbbdf Bump recipe-scrapers from 14.11.0 to 14.14.0
Bumps [recipe-scrapers](https://github.com/hhursev/recipe-scrapers) from 14.11.0 to 14.14.0.
- [Release notes](https://github.com/hhursev/recipe-scrapers/releases)
- [Commits](https://github.com/hhursev/recipe-scrapers/compare/14.11.0...14.14.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>
2022-09-12 15:59:09 +00:00
vabene1111
bd6b04f95e Merge branch 'develop' of https://github.com/vabene1111/recipes into develop 2022-09-12 17:58:22 +02:00
vabene1111
b315d6e171 adding debug toolbar 2022-09-12 17:58:20 +02:00
Alexandre
35bb3c9eb1 Add updates and backup instructions 2022-09-10 22:33:06 +02:00
Noé Feutry
84e7850e91 Translated using Weblate (French)
Currently translated at 85.2% (392 of 460 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/fr/
2022-09-10 19:33:01 +00:00
David Schenk
4b40d75d1d Translated using Weblate (German)
Currently translated at 99.6% (522 of 524 strings)

Translation: Tandoor/Recipes Backend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-backend/de/
2022-09-10 19:33:01 +00:00
Alexandre
5423019a14 Add self promotion 2022-09-10 11:57:27 +02:00
Alexandre
e8c5c610b7 Improve layout 2022-09-10 11:54:21 +02:00
Alexandre
3f0cef59b8 Create home assistant install instructions 2022-09-10 11:53:56 +02:00
Alexandre
867c3595ff Merge branch 'TandoorRecipes:develop' into develop 2022-09-10 10:51:58 +02:00
vabene1111
631dd58c1f fixed share link guest user error message 2022-09-09 18:28:01 +02:00
vabene1111
ba235b26b7 fixed make header not removing food/unit/amount 2022-09-09 18:18:29 +02:00
dependabot[bot]
e54e850241 Bump markdown from 3.3.7 to 3.4.1
Bumps [markdown](https://github.com/Python-Markdown/markdown) from 3.3.7 to 3.4.1.
- [Release notes](https://github.com/Python-Markdown/markdown/releases)
- [Commits](https://github.com/Python-Markdown/markdown/compare/3.3.7...3.4.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-09 16:09:40 +00:00
vabene1111
40c85c512c Merge pull request #1968 from TandoorRecipes/dependabot/pip/pillow-9.2.0
Bump pillow from 9.1.1 to 9.2.0
2022-09-09 18:09:02 +02:00
vabene1111
ca5eb7b2b6 Merge pull request #1984 from andyjayne/fix-nl-ingredients
fix: ingredient parsing for non-latin languages
2022-09-09 18:07:55 +02:00
dependabot[bot]
574a6ab5f4 Bump pillow from 9.1.1 to 9.2.0
Bumps [pillow](https://github.com/python-pillow/Pillow) from 9.1.1 to 9.2.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/9.1.1...9.2.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-09 16:06:44 +00:00
vabene1111
39070d32bd Merge pull request #1986 from CameronJGrant/develop
Solves #1830 (Split times over 60 min into hours and minutes)
2022-09-09 18:06:34 +02:00
vabene1111
9aa3d2d87a Merge pull request #2013 from nough/develop
Update documentation on external recipes
2022-09-09 18:05:29 +02:00
vabene1111
02926516b9 Merge pull request #2025 from TandoorRecipes/dependabot/pip/python-dotenv-0.21.0
Bump python-dotenv from 0.20.0 to 0.21.0
2022-09-09 18:05:18 +02:00
dependabot[bot]
215f561623 Bump python-dotenv from 0.20.0 to 0.21.0
Bumps [python-dotenv](https://github.com/theskumar/python-dotenv) from 0.20.0 to 0.21.0.
- [Release notes](https://github.com/theskumar/python-dotenv/releases)
- [Changelog](https://github.com/theskumar/python-dotenv/blob/main/CHANGELOG.md)
- [Commits](https://github.com/theskumar/python-dotenv/compare/v0.20.0...v0.21.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-09 16:04:58 +00:00
vabene1111
e2c2f5d757 Merge pull request #2017 from TandoorRecipes/dependabot/pip/drf-writable-nested-0.7.0
Bump drf-writable-nested from 0.6.4 to 0.7.0
2022-09-09 18:04:33 +02:00
vabene1111
d887405ab3 Merge pull request #2018 from TandoorRecipes/dependabot/npm_and_yarn/vue/typescript-4.8.2
Bump typescript from 4.7.2 to 4.8.2 in /vue
2022-09-09 18:04:29 +02:00
vabene1111
00deb75195 Merge pull request #2019 from TandoorRecipes/dependabot/npm_and_yarn/vue/core-js-3.25.0
Bump core-js from 3.22.7 to 3.25.0 in /vue
2022-09-09 18:04:21 +02:00
Tomasz Klimczak
b228b0f42a Translated using Weblate (Polish)
Currently translated at 100.0% (460 of 460 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/pl/
2022-09-05 21:32:56 +00:00
Tomasz Klimczak
3d5ff23433 Translated using Weblate (Polish)
Currently translated at 99.3% (457 of 460 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/pl/
2022-09-03 23:32:55 +00:00
Alexandre
1a24f34499 Create homeassistant.md 2022-09-03 18:59:14 +02:00
1k2
8459b40743 Translated using Weblate (Dutch)
Currently translated at 99.3% (457 of 460 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/nl/
2022-09-01 20:32:55 +00:00
1k2
75cb5d2d4c Translated using Weblate (Dutch)
Currently translated at 99.4% (521 of 524 strings)

Translation: Tandoor/Recipes Backend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-backend/nl/
2022-09-01 20:32:53 +00:00
dependabot[bot]
bd1b40dd94 Bump core-js from 3.22.7 to 3.25.0 in /vue
Bumps [core-js](https://github.com/zloirock/core-js) from 3.22.7 to 3.25.0.
- [Release notes](https://github.com/zloirock/core-js/releases)
- [Changelog](https://github.com/zloirock/core-js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/zloirock/core-js/compare/v3.22.7...v3.25.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-01 00:37:12 +00:00
dependabot[bot]
95d4bfb2bd Bump typescript from 4.7.2 to 4.8.2 in /vue
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.7.2 to 4.8.2.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.7.2...v4.8.2)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-01 00:34:33 +00:00
dependabot[bot]
23caac9d09 Bump drf-writable-nested from 0.6.4 to 0.7.0
Bumps [drf-writable-nested](https://github.com/beda-software/drf-writable-nested) from 0.6.4 to 0.7.0.
- [Release notes](https://github.com/beda-software/drf-writable-nested/releases)
- [Changelog](https://github.com/beda-software/drf-writable-nested/blob/master/CHANGELOG.md)
- [Commits](https://github.com/beda-software/drf-writable-nested/compare/v0.6.4...v0.7.0)

---
updated-dependencies:
- dependency-name: drf-writable-nested
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-01 00:15:01 +00:00
nough
ece4f6e32d Update updating.md 2022-08-28 20:52:52 +01:00
nough
5e7d1ba827 Update updating.md
remove outline of docker update batch script - it wasn't ready and I committed it when I didn't understand how github branches work (I still don't, really).
2022-08-28 20:51:26 +01:00
nough
a88214eea6 Update external_recipes.md
fixed my mistakes
2022-08-27 22:18:52 +01:00
nough
7ec5646338 update external_recipes.md with docker info
added info on docker external recipes, as i've just followed this process myself. unsure if I needed to add the externalfiles folder to the nginx_recipes volume, but I have anyway in my personal one, and that worked.
2022-08-27 22:12:33 +01:00
nough
c020bea41e Merge branch 'TandoorRecipes:develop' into develop 2022-08-27 21:57:02 +01:00
吕楪
e6f79a6fa3 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (460 of 460 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/zh_Hans/
2022-08-23 13:32:56 +00:00
Mike Miller
0ab430ea82 Translated using Weblate (German)
Currently translated at 99.7% (459 of 460 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/de/
2022-08-23 13:32:56 +00:00
Kirstin Seidel-Gebert
3d95657b8a Translated using Weblate (German)
Currently translated at 99.7% (459 of 460 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/de/
2022-08-23 13:32:56 +00:00
吕楪
726157a062 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (524 of 524 strings)

Translation: Tandoor/Recipes Backend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-backend/zh_Hans/
2022-08-23 13:32:51 +00:00
Kirstin Seidel-Gebert
f8793f3ec8 Translated using Weblate (German)
Currently translated at 99.6% (522 of 524 strings)

Translation: Tandoor/Recipes Backend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-backend/de/
2022-08-23 13:32:51 +00:00
吕楪
09929beeb9 Translated using Weblate (Chinese (Simplified))
Currently translated at 98.6% (454 of 460 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/zh_Hans/
2022-08-22 09:56:23 +00:00
Mathias Rasmussen
2a1b2c18fc Translated using Weblate (Danish)
Currently translated at 100.0% (528 of 528 strings)

Translation: Tandoor/Recipes Backend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-backend/da/
2022-08-18 14:32:52 +00:00
Mathias Rasmussen
0cc3df71d2 Translated using Weblate (Danish)
Currently translated at 100.0% (460 of 460 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/da/
2022-08-14 16:32:49 +00:00
Thorin
e124c211ac Translated using Weblate (Spanish)
Currently translated at 73.2% (315 of 430 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/es/
2022-08-12 21:32:52 +00:00
Thorin
dc2f62dc9d Translated using Weblate (Spanish)
Currently translated at 53.0% (278 of 524 strings)

Translation: Tandoor/Recipes Backend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-backend/es/
2022-08-12 21:32:52 +00:00
Cameron Grant
38921f1254 Updated time to use hours and minutes split 2022-08-11 14:23:31 -07:00
vabene1111
4fec9a493e Merge pull request #1989 from TandoorRecipes/dependabot/pip/django-4.0.7
Bump django from 4.0.6 to 4.0.7
2022-08-11 23:07:43 +02:00
dependabot[bot]
71c5adda79 Bump django from 4.0.6 to 4.0.7
Bumps [django](https://github.com/django/django) from 4.0.6 to 4.0.7.
- [Release notes](https://github.com/django/django/releases)
- [Commits](https://github.com/django/django/compare/4.0.6...4.0.7)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-11 15:25:12 +00:00
Andrew Jayne
cffa731106 fix: ingredient parsing for non-latin languages
Before this change the ingredient string for non-latin
languages was not being parsed into the correct amount
or units when the food is found at the start of the
ingredient string.

This was because the regex being used was restricted to
latin characters.

With this change the amount and units are correctly
parsed from such a string.

Fixes https://github.com/TandoorRecipes/recipes/issues/1983
2022-08-07 21:37:59 +01:00
vabene1111
c7f75fe58f boot.sh 2022-08-05 17:55:25 +02:00
vabene1111
2eed5143fe boot.sh 2022-08-05 17:43:59 +02:00
vabene1111
6e4ea518d9 boot.sh 2022-08-05 17:36:00 +02:00
vabene1111
a898d722d6 fixed typo 2022-08-05 17:21:59 +02:00
vabene1111
904358bb00 allow changing gunicorn settings 2022-08-05 17:13:27 +02:00
vabene1111
6605b87c5c new settings page finished 2022-08-05 16:54:53 +02:00
vabene1111
64688ca5e1 Merge branch 'develop' of https://github.com/vabene1111/recipes into develop 2022-08-05 14:28:22 +02:00
vabene1111
e9a1a06bda fixed recipe share permission 2022-08-05 14:28:17 +02:00
vabene1111
a8da28f877 Merge pull request #1980 from 8633brown/nplusone
prefetch food relations #1965
2022-08-05 07:53:01 +02:00
8633brown
70b2bd6ccf prefetch food relations #1965 2022-08-04 22:11:48 +01:00
vabene1111
8ed5d52ddf fixed space settings saving issue 2022-08-04 18:54:00 +02:00
vabene1111
f7af0741fe fixed bookmarklet 2022-08-04 18:45:40 +02:00
vabene1111
3ec4afb02f fixed scoping and permissions for tokens 2022-08-04 18:33:45 +02:00
vabene1111
3f77b73a61 add multiple API tokens per user, removes old API tokens 2022-08-04 17:24:54 +02:00
Oliver Cervera
9e62d8a3a3 Translated using Weblate (Italian)
Currently translated at 79.9% (419 of 524 strings)

Translation: Tandoor/Recipes Backend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-backend/it/
2022-08-04 11:32:45 +00:00
vabene1111
9ef21241bf markdown editor adjustments 2022-08-01 17:13:44 +02:00
vabene1111
5e77adf7e6 fixed mail send 2022-08-01 16:56:18 +02:00
vabene1111
4df0a46701 Merge pull request #1975 from TandoorRecipes/dependabot/pip/icalendar-4.1.0
Bump icalendar from 4.0.9 to 4.1.0
2022-08-01 16:28:48 +02:00
dependabot[bot]
f186404628 Bump icalendar from 4.0.9 to 4.1.0
Bumps [icalendar](https://github.com/collective/icalendar) from 4.0.9 to 4.1.0.
- [Release notes](https://github.com/collective/icalendar/releases)
- [Changelog](https://github.com/collective/icalendar/blob/4.1.0/CHANGES.rst)
- [Commits](https://github.com/collective/icalendar/compare/4.0.9...4.1.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-01 14:28:24 +00:00
vabene1111
8e3ec91f3c Merge pull request #1961 from AquaticLava/develop
Fixes  #1234
2022-08-01 16:28:18 +02:00
vabene1111
2605addf34 Merge pull request #1974 from TandoorRecipes/dependabot/pip/drf-writable-nested-0.6.4
Bump drf-writable-nested from 0.6.3 to 0.6.4
2022-08-01 16:27:48 +02:00
vabene1111
1ab3e57b83 Merge pull request #1947 from dmaes/develop
Add S3_CUSTOM_DOMAIN settings, closes #1943
2022-08-01 16:27:16 +02:00
dependabot[bot]
2f36ae5112 Bump drf-writable-nested from 0.6.3 to 0.6.4
Bumps [drf-writable-nested](https://github.com/beda-software/drf-writable-nested) from 0.6.3 to 0.6.4.
- [Release notes](https://github.com/beda-software/drf-writable-nested/releases)
- [Changelog](https://github.com/beda-software/drf-writable-nested/blob/master/CHANGELOG.md)
- [Commits](https://github.com/beda-software/drf-writable-nested/compare/v0.6.3...v0.6.4)

---
updated-dependencies:
- dependency-name: drf-writable-nested
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-01 14:27:15 +00:00
vabene1111
acc19ca65e Merge pull request #1973 from TandoorRecipes/dependabot/pip/python-ldap-3.4.2
Bump python-ldap from 3.4.0 to 3.4.2
2022-08-01 16:26:46 +02:00
vabene1111
ea213e2dfd Merge pull request #1948 from iamkarlson/feature/fix_csrf_django_40
fixed csrf
2022-08-01 16:25:56 +02:00
vabene1111
02cf3264a3 Merge branch 'develop' of https://github.com/vabene1111/recipes into develop 2022-08-01 16:18:46 +02:00
vabene1111
a0b1186558 settings wip 2022-08-01 16:18:43 +02:00
dependabot[bot]
27e47718bb Bump python-ldap from 3.4.0 to 3.4.2
Bumps [python-ldap](https://github.com/python-ldap/python-ldap) from 3.4.0 to 3.4.2.
- [Release notes](https://github.com/python-ldap/python-ldap/releases)
- [Commits](https://github.com/python-ldap/python-ldap/compare/python-ldap-3.4.0...python-ldap-3.4.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-01 05:52:23 +00:00
vabene1111
f78dd209bd Merge pull request #1967 from TandoorRecipes/dependabot/pip/recipe-scrapers-14.11.0
Bump recipe-scrapers from 14.6.0 to 14.11.0
2022-08-01 07:51:58 +02:00
dependabot[bot]
b4e0b51f5b Bump recipe-scrapers from 14.6.0 to 14.11.0
Bumps [recipe-scrapers](https://github.com/hhursev/recipe-scrapers) from 14.6.0 to 14.11.0.
- [Release notes](https://github.com/hhursev/recipe-scrapers/releases)
- [Commits](https://github.com/hhursev/recipe-scrapers/compare/14.6.0...14.11.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>
2022-08-01 00:13:53 +00:00
AquaticLava
eedce4dcfd fixes shopping list number showing completed items 2022-07-27 21:03:21 -06:00
AquaticLava
006be92180 Fixes #1234 2022-07-26 17:49:43 -06:00
Tomasz Klimczak
1fae004785 Translated using Weblate (Polish)
Currently translated at 100.0% (427 of 427 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/pl/
2022-07-26 21:32:41 +00:00
Huth Jimmy
239a88cd24 Translated using Weblate (French)
Currently translated at 88.5% (378 of 427 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/fr/
2022-07-26 21:32:41 +00:00
vabene1111
22b432a6ae Merge pull request #1952 from tomtjes/patch-1
fix minor issues in CopyMeThat importer
2022-07-25 14:48:26 +02:00
tomtjes
c88566a4ae fix minor issues in CopyMeThat importer
improve handling of empty fields and fields that exceed character limits
2022-07-22 12:14:23 -04:00
vabene1111
5f8e371793 Merge pull request #1949 from TandoorRecipes/dependabot/npm_and_yarn/vue/terser-4.8.1
Bump terser from 4.8.0 to 4.8.1 in /vue
2022-07-21 07:46:56 +02:00
dependabot[bot]
94d9ac03ea Bump terser from 4.8.0 to 4.8.1 in /vue
Bumps [terser](https://github.com/terser/terser) from 4.8.0 to 4.8.1.
- [Release notes](https://github.com/terser/terser/releases)
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-21 05:21:46 +00:00
George Green
897ac97423 fixed csrf 2022-07-20 21:17:29 +02:00
dmaes
24aeae6de9 update .env.template 2022-07-20 10:45:52 +02:00
dmaes
ce941db3be add S3_CUSTOM_DOMAIN setting 2022-07-20 08:54:34 +02:00
vabene1111
5ff91ee47f more settings in 2022-07-15 17:39:44 +02:00
vabene1111
ce1f55ffd1 settings wip 2022-07-15 17:12:01 +02:00
vabene1111
8700e2df69 basics of new settings page working 2022-07-14 17:50:20 +02:00
vabene1111
f4df84b609 added ability to set space images 2022-07-14 15:23:59 +02:00
vabene1111
ba473123ba added ability to use invite link more than once 2022-07-14 11:28:13 +02:00
vabene1111
98a54ef38f removed lots of unused stuff 2022-07-14 10:37:15 +02:00
vabene1111
7fdc9c7cb8 added sharing permission test 2022-07-14 10:30:45 +02:00
vabene1111
dc3b1566d7 made shared field for recipe api optional 2022-07-14 10:21:35 +02:00
vabene1111
5429c4d557 Merge pull request #1937 from tomtjes/patch-1
Update copymethat.py
2022-07-14 09:53:43 +02:00
tomtjes
dabcea6ba7 Update copymethat.py
- make use of field for source URL
- preserve "I made this" flag as keyword
- preserve long descriptions in full at bottom of steps
- preserve ingredient and step headers
2022-07-13 14:37:16 -04:00
vabene1111
e91790f5ac added ability to mark recipes as private 2022-07-13 15:46:39 +02:00
vabene1111
51076d4ced Merge branch 'master' into develop 2022-07-13 10:25:39 +02:00
vabene1111
1cb37fe2d2 dont allow space manage page in demo 2022-07-13 10:25:22 +02:00
vabene1111
61a9f0647b added userspace admin 2022-07-13 10:24:12 +02:00
vabene1111
ac2ab62050 moved import functions to proper api function 2022-07-12 21:14:51 +02:00
vabene1111
c50efac00e basics for profile page 2022-07-12 20:57:13 +02:00
vabene1111
bf16e61a1f removed unused stuff and fixed manifest 2022-07-12 20:52:32 +02:00
vabene1111
d464633c70 removed django filters 2022-07-12 20:38:18 +02:00
vabene1111
b78d0ec30b added userspace admin 2022-07-12 20:37:38 +02:00
vabene1111
da09602834 removed old search pages 2022-07-12 20:05:59 +02:00
vabene1111
5ead4967a5 removed ingredient list shopping 2022-07-12 19:54:18 +02:00
vabene1111
8bb7ce2062 removed user servings feature 2022-07-12 19:43:11 +02:00
vabene1111
0068c75e31 Merge branch 'develop' 2022-07-12 19:41:50 +02:00
vabene1111
5de7fa9d48 fixed another social auth issues 2022-07-12 19:41:46 +02:00
vabene1111
3dc3592783 Merge branch 'develop' 2022-07-12 19:20:42 +02:00
vabene1111
43a082a51a updated translations 2022-07-12 19:20:35 +02:00
vabene1111
4c264673df fixed copy me that importer 2022-07-12 19:20:05 +02:00
vabene1111
d537d73c6a Merge pull request #1930 from Mikhail5555/patch-1
Add documentation for migrating from sqlite3 database to postgresql (Unraid)
2022-07-12 14:46:00 +02:00
vabene1111
5c227ecc57 Merge pull request #1931 from smilerz/fix_cookbookapp_import
updated cookbookapp importer to handle multi-step recipes
2022-07-12 08:45:17 +02:00
smilerz
b03fa4fdf2 updated cookbookapp importer to handle multi-step recipes 2022-07-11 17:21:56 -05:00
vabene1111
38219a22ca fixed issue with social default access and multi space tennany 2022-07-11 23:42:26 +02:00
Mikhail5555
9d6a5efa72 Update migration_sqlite-postgres.md 2022-07-11 23:14:55 +02:00
Mikhail5555
aaa0520a6d Update migration_sqlite-postgres.md 2022-07-11 23:12:42 +02:00
Mikhail5555
eb0f231a80 Create migration_sqlite-postgres.md 2022-07-11 23:09:41 +02:00
vabene1111
17f3da5a37 removed dead invite link button from system page 2022-07-11 14:54:00 +02:00
vabene1111
608039b7e4 cookbookapp importer more or less broken (more) 2022-07-11 14:46:54 +02:00
vabene1111
bb424cc3d6 Merge pull request #1917 from smilerz/bookmarklet_fix
Bookmarklet fix
2022-07-11 14:28:08 +02:00
Mike Miller
9eaf0f9530 Translated using Weblate (German)
Currently translated at 96.9% (414 of 427 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/de/
2022-07-10 08:32:35 +00:00
Kalli_1
b44bb552e0 Translated using Weblate (German)
Currently translated at 96.9% (414 of 427 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/de/
2022-07-10 08:32:35 +00:00
nough
c86ff27bef Update backup.md
Further information, backup using import/export.
2022-07-08 09:19:48 +01:00
nough
be6bb5f039 Merge branch 'TandoorRecipes:develop' into develop 2022-07-08 09:14:57 +01:00
smilerz
e40b73f420 deprecate get_recipe_from_source 2022-07-07 15:09:22 -05:00
vabene1111
5b3d8a3aaf Merge branch 'develop' 2022-07-07 19:38:32 +02:00
vabene1111
fd4051c04a fixed copy to clipboard 2022-07-07 19:16:16 +02:00
vabene1111
5f0fa24c2a Merge pull request #1908 from nough/patch-1
Update backup.md with manual process
2022-07-07 18:57:43 +02:00
vabene1111
0d676e1957 Merge pull request #1909 from smilerz/makenow_query_fix
fix makenow filter
2022-07-07 18:56:31 +02:00
vabene1111
8539e365fb Merge pull request #1915 from TandoorRecipes/dependabot/npm_and_yarn/vue/moment-2.29.4
Bump moment from 2.29.3 to 2.29.4 in /vue
2022-07-07 18:52:49 +02:00
dependabot[bot]
dd25ea748b Bump moment from 2.29.3 to 2.29.4 in /vue
Bumps [moment](https://github.com/moment/moment) from 2.29.3 to 2.29.4.
- [Release notes](https://github.com/moment/moment/releases)
- [Changelog](https://github.com/moment/moment/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/moment/moment/compare/2.29.3...2.29.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-07 16:50:54 +00:00
vabene1111
2b74c1c47b Merge pull request #1912 from TandoorRecipes/dependabot/pip/lxml-4.9.1
Bump lxml from 4.9.0 to 4.9.1
2022-07-07 18:50:23 +02:00
nough
9961746f1f update, adding docker backup script outline 2022-07-07 15:46:31 +01:00
smilerz
b1c0334947 quick hack to allow scraper to work correctly 2022-07-07 07:50:57 -05:00
smilerz
25a41bd293 reverting scraper to just using wildmode 2022-07-07 06:43:07 -05:00
nough
ac25beddda Update backup.md
working restore function
2022-07-07 10:27:32 +01:00
nough
9d38186404 Update backup.md
updated with functional code
2022-07-07 10:16:52 +01:00
dependabot[bot]
51d9ffbb4e Bump lxml from 4.9.0 to 4.9.1
Bumps [lxml](https://github.com/lxml/lxml) from 4.9.0 to 4.9.1.
- [Release notes](https://github.com/lxml/lxml/releases)
- [Changelog](https://github.com/lxml/lxml/blob/master/CHANGES.txt)
- [Commits](https://github.com/lxml/lxml/compare/lxml-4.9.0...lxml-4.9.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-06 21:47:07 +00:00
smilerz
e23d514d89 fix bookmarklet 2022-07-06 16:16:53 -05:00
nough
0697116a21 Update backup.md
Added comment about backing up when other containers are failing
2022-07-06 19:29:22 +01:00
Nidhal Brniyah
165bb00040 Translated using Weblate (Arabic)
Currently translated at 20.4% (108 of 528 strings)

Translation: Tandoor/Recipes Backend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-backend/ar/
2022-07-06 14:32:36 +00:00
vabene1111
07947199c0 Merge pull request #1910 from TandoorRecipes/dependabot/pip/django-4.0.6
Bump django from 4.0.5 to 4.0.6
2022-07-06 09:07:04 +02:00
dependabot[bot]
92aadb4743 Bump django from 4.0.5 to 4.0.6
Bumps [django](https://github.com/django/django) from 4.0.5 to 4.0.6.
- [Release notes](https://github.com/django/django/releases)
- [Commits](https://github.com/django/django/compare/4.0.5...4.0.6)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-05 22:39:26 +00:00
smilerz
bd89de6f4d fix makenow filter 2022-07-05 14:31:32 -05:00
vabene1111
dca567b5fa Added translation using Weblate (Arabic) 2022-07-05 12:04:35 +00:00
vabene1111
a015c2f566 Added translation using Weblate (Arabic) 2022-07-05 12:04:31 +00:00
vabene1111
946de2e7e3 updated scrapers 2022-07-05 09:01:40 +02:00
vabene1111
690c486bb2 zip files before download in file broswer
needs to be completly rewritten in the future but for now this is more secure
2022-07-04 14:39:53 +02:00
vabene1111
d9d0676bed temporarily disable table button in mavon editor 2022-07-01 11:58:28 +02:00
vabene1111
9c8a410e50 fixed non spaced page load 2022-07-01 11:03:53 +02:00
vabene1111
22296de03c Merge pull request #1885 from Jbonnett/feature/reset_inheritance_fix
Fixes #1857
2022-07-01 11:02:26 +02:00
vabene1111
9228f9c339 Merge pull request #1891 from TandoorRecipes/dependabot/pip/django-allauth-0.51.0
Bump django-allauth from 0.50.0 to 0.51.0
2022-07-01 08:56:29 +02:00
vabene1111
609d4477ae Merge pull request #1906 from TandoorRecipes/dependabot/pip/requests-2.28.1
Bump requests from 2.27.1 to 2.28.1
2022-07-01 08:56:11 +02:00
vabene1111
fc0cfe3133 Merge pull request #1905 from TandoorRecipes/dependabot/pip/pytest-factoryboy-2.5.0
Bump pytest-factoryboy from 2.4.0 to 2.5.0
2022-07-01 08:55:48 +02:00
vabene1111
ebe1aa33f3 Merge pull request #1904 from TandoorRecipes/dependabot/pip/django-4.0.5
Bump django from 4.0.4 to 4.0.5
2022-07-01 08:55:41 +02:00
dependabot[bot]
e451adbfdb Bump requests from 2.27.1 to 2.28.1
Bumps [requests](https://github.com/psf/requests) from 2.27.1 to 2.28.1.
- [Release notes](https://github.com/psf/requests/releases)
- [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md)
- [Commits](https://github.com/psf/requests/compare/v2.27.1...v2.28.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-01 06:55:07 +00:00
dependabot[bot]
852c64d9f4 Bump pytest-factoryboy from 2.4.0 to 2.5.0
Bumps [pytest-factoryboy](https://github.com/pytest-dev/pytest-factoryboy) from 2.4.0 to 2.5.0.
- [Release notes](https://github.com/pytest-dev/pytest-factoryboy/releases)
- [Changelog](https://github.com/pytest-dev/pytest-factoryboy/blob/master/CHANGES.rst)
- [Commits](https://github.com/pytest-dev/pytest-factoryboy/compare/2.4.0...2.5.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-01 06:55:02 +00:00
dependabot[bot]
d96b6dbefb Bump django from 4.0.4 to 4.0.5
Bumps [django](https://github.com/django/django) from 4.0.4 to 4.0.5.
- [Release notes](https://github.com/django/django/releases)
- [Commits](https://github.com/django/django/compare/4.0.4...4.0.5)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-01 06:54:56 +00:00
vabene1111
fbbd57a4ae Merge pull request #1903 from TandoorRecipes/dependabot/pip/django-cors-headers-3.13.0
Bump django-cors-headers from 3.12.0 to 3.13.0
2022-07-01 08:54:48 +02:00
dependabot[bot]
e5cc990111 Bump django-allauth from 0.50.0 to 0.51.0
Bumps [django-allauth](https://github.com/pennersr/django-allauth) from 0.50.0 to 0.51.0.
- [Release notes](https://github.com/pennersr/django-allauth/releases)
- [Changelog](https://github.com/pennersr/django-allauth/blob/master/ChangeLog.rst)
- [Commits](https://github.com/pennersr/django-allauth/compare/0.50.0...0.51.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-01 06:54:46 +00:00
vabene1111
78482313d8 Merge pull request #1902 from TandoorRecipes/dependabot/pip/bleach-5.0.1
Bump bleach from 5.0.0 to 5.0.1
2022-07-01 08:54:39 +02:00
vabene1111
5b601695e1 Merge pull request #1901 from TandoorRecipes/dependabot/pip/pytube-12.1.0
Bump pytube from 12.0.0 to 12.1.0
2022-07-01 08:54:34 +02:00
dependabot[bot]
d6a67335ed Bump django-cors-headers from 3.12.0 to 3.13.0
Bumps [django-cors-headers](https://github.com/adamchainz/django-cors-headers) from 3.12.0 to 3.13.0.
- [Release notes](https://github.com/adamchainz/django-cors-headers/releases)
- [Changelog](https://github.com/adamchainz/django-cors-headers/blob/main/HISTORY.rst)
- [Commits](https://github.com/adamchainz/django-cors-headers/compare/3.12.0...3.13.0)

---
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>
2022-07-01 06:53:58 +00:00
dependabot[bot]
4f7b68c882 Bump bleach from 5.0.0 to 5.0.1
Bumps [bleach](https://github.com/mozilla/bleach) from 5.0.0 to 5.0.1.
- [Release notes](https://github.com/mozilla/bleach/releases)
- [Changelog](https://github.com/mozilla/bleach/blob/main/CHANGES)
- [Commits](https://github.com/mozilla/bleach/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-01 06:53:54 +00:00
dependabot[bot]
1359782d30 Bump pytube from 12.0.0 to 12.1.0
Bumps [pytube](https://github.com/pytube/pytube) from 12.0.0 to 12.1.0.
- [Release notes](https://github.com/pytube/pytube/releases)
- [Commits](https://github.com/pytube/pytube/compare/v12.0.0...v12.1.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-01 06:53:51 +00:00
vabene1111
966bd5fd33 Merge pull request #1899 from TandoorRecipes/dependabot/pip/whitenoise-6.2.0
Bump whitenoise from 6.1.0 to 6.2.0
2022-07-01 08:53:49 +02:00
vabene1111
759264e1d5 Merge pull request #1900 from TandoorRecipes/dependabot/pip/django-filter-22.1
Bump django-filter from 21.1 to 22.1
2022-07-01 08:53:40 +02:00
vabene1111
65c0f3d786 Merge pull request #1888 from TandoorRecipes/dependabot/pip/recipe-scrapers-14.5.2
Bump recipe-scrapers from 14.2.0 to 14.5.2
2022-07-01 08:53:30 +02:00
dependabot[bot]
f1535b4b54 Bump django-filter from 21.1 to 22.1
Bumps [django-filter](https://github.com/carltongibson/django-filter) from 21.1 to 22.1.
- [Release notes](https://github.com/carltongibson/django-filter/releases)
- [Changelog](https://github.com/carltongibson/django-filter/blob/main/CHANGES.rst)
- [Commits](https://github.com/carltongibson/django-filter/compare/21.1...22.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-01 06:43:55 +00:00
dependabot[bot]
fcb5f51a78 Bump whitenoise from 6.1.0 to 6.2.0
Bumps [whitenoise](https://github.com/evansd/whitenoise) from 6.1.0 to 6.2.0.
- [Release notes](https://github.com/evansd/whitenoise/releases)
- [Changelog](https://github.com/evansd/whitenoise/blob/main/docs/changelog.rst)
- [Commits](https://github.com/evansd/whitenoise/compare/6.1.0...6.2.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-01 06:43:52 +00:00
vabene1111
50fc98dcb3 Merge pull request #1889 from TandoorRecipes/dependabot/pip/boto3-1.24.21
Bump boto3 from 1.24.0 to 1.24.21
2022-07-01 08:43:45 +02:00
vabene1111
c1a1fe1047 Merge pull request #1887 from TandoorRecipes/dependabot/pip/validators-0.20.0
Bump validators from 0.19.0 to 0.20.0
2022-07-01 08:43:29 +02:00
dependabot[bot]
b3a60f70ff Bump boto3 from 1.24.0 to 1.24.21
Bumps [boto3](https://github.com/boto/boto3) from 1.24.0 to 1.24.21.
- [Release notes](https://github.com/boto/boto3/releases)
- [Changelog](https://github.com/boto/boto3/blob/develop/CHANGELOG.rst)
- [Commits](https://github.com/boto/boto3/compare/1.24.0...1.24.21)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-01 00:04:35 +00:00
dependabot[bot]
5ee0033983 Bump recipe-scrapers from 14.2.0 to 14.5.2
Bumps [recipe-scrapers](https://github.com/hhursev/recipe-scrapers) from 14.2.0 to 14.5.2.
- [Release notes](https://github.com/hhursev/recipe-scrapers/releases)
- [Commits](https://github.com/hhursev/recipe-scrapers/compare/14.2.0...14.5.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-01 00:04:26 +00:00
dependabot[bot]
a28e653386 Bump validators from 0.19.0 to 0.20.0
Bumps [validators](https://github.com/kvesteri/validators) from 0.19.0 to 0.20.0.
- [Release notes](https://github.com/kvesteri/validators/releases)
- [Changelog](https://github.com/kvesteri/validators/blob/master/CHANGES.rst)
- [Commits](https://github.com/kvesteri/validators/compare/0.19.0...0.20.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-01 00:04:22 +00:00
Joshua Bonnett
8d568526be Fixes #1857 2022-06-29 05:15:22 -07:00
vabene1111
6643008baf media query for navbar scrolling 2022-06-28 07:30:42 +02:00
vabene1111
44a19e03e8 fixed ingredient list step header duplication 2022-06-28 06:32:25 +02:00
vabene1111
b5207d91ba fixed navbar viewport issues 2022-06-28 06:19:58 +02:00
vabene1111
f1d54675c3 allow editing recipe source filed 2022-06-28 06:17:43 +02:00
vabene1111
b057b6006c add debounce to food search on recipe edit 2022-06-26 12:54:08 +02:00
vabene1111
f92a62da4e improved header show/hide for step name 2022-06-26 12:47:40 +02:00
vabene1111
27c695a393 allow disabling of ingredient overview 2022-06-26 12:36:37 +02:00
vabene1111
7945c1a431 fixed ingredient compontent 2022-06-26 12:18:13 +02:00
vabene1111
7c31cb9993 updated and compiled translations 2022-06-26 12:10:25 +02:00
vabene1111
f6d46cae79 Merge pull request #1866 from nicedevil007/nicedevil007-patch-1
Updates with more packages
2022-06-26 12:08:16 +02:00
César Blanco Guillamon
0e49615a40 Translated using Weblate (Spanish)
Currently translated at 53.4% (282 of 528 strings)

Translation: Tandoor/Recipes Backend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-backend/es/
2022-06-25 17:32:27 +00:00
Tomasz Klimczak
534792cd1a Translated using Weblate (Polish)
Currently translated at 100.0% (425 of 425 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/pl/
2022-06-22 18:32:29 +00:00
Andreas Thor Lau
89891d11d7 Translated using Weblate (Danish)
Currently translated at 100.0% (414 of 414 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/da/
2022-06-20 19:32:27 +00:00
vabene1111
cb86ece0c4 fixed parse servings function 2022-06-20 16:53:14 +02:00
vabene1111
e7976fab46 show import links 2022-06-20 16:52:42 +02:00
vabene1111
11cb40702d cookmate fixes 2022-06-20 16:29:33 +02:00
vabene1111
877b7799df added proper login template for social auth 2022-06-20 15:40:42 +02:00
vabene1111
7f35d462b6 fixed url import servings 2022-06-20 15:25:23 +02:00
nicedevil007
fff5c2387b removed python3.9 from update (python3 is enough) 2022-06-18 23:02:03 +02:00
nicedevil007
3de6f6faf8 Added the "--no-input" to the collectstatic lines 2022-06-18 22:32:09 +02:00
nicedevil007
e6f80497a9 Updates with more packages
Updated the manual installation file to get everybody up and running.
There were missing requirements like the nginx installation and so on.

Now a first time linux user should be able to get this up and running.
2022-06-18 09:49:25 +02:00
vabene1111
6c122e4ed0 fixed autofocus on markdown editor 2022-06-16 16:21:35 +02:00
Kaibu
1836056bd1 Recipe edit icons on mobile 2022-06-15 17:33:03 +02:00
Kaibu
cdc95d8fd2 ingredient card cleanup 2022-06-15 16:42:28 +02:00
Kaibu
d3c3339d5e shopping modal ui fixes 2022-06-15 16:27:43 +02:00
Kaibu
50992d3411 Merge branch 'develop' of https://github.com/TandoorRecipes/recipes into develop 2022-06-15 15:56:25 +02:00
Kaibu
2ae3e7f5b9 reactivated shopping list swipe only on food name 2022-06-15 15:56:18 +02:00
vabene1111
99ea193237 fixed url breaking recipe view 2022-06-15 15:47:52 +02:00
vabene1111
3427f7bbea fixed new limit recipe create 2022-06-15 15:37:20 +02:00
vabene1111
44704be22b fixed limit check for new recipes 2022-06-15 15:36:10 +02:00
vabene1111
356dec636f fixed ingredient paste and plan share serialize 2022-06-14 21:48:17 +02:00
vabene1111
355f181574 added youtube import 2022-06-14 21:37:59 +02:00
vabene1111
b365f9adc1 Merge pull request #1829 from astappiev/fixes
Some minor visual fixes
2022-06-14 21:03:00 +02:00
vabene1111
af1282c268 Merge pull request #1723 from vekunz/feature/optimize_printing
Fix some issues to improve the print output
2022-06-14 20:59:57 +02:00
vabene1111
9ccceb2199 Merge pull request #1815 from anu-codes/patch-1
Grammatical errors
2022-06-14 20:58:37 +02:00
vabene1111
bdea6440a8 Merge pull request #1854 from AliveDevil/feature/discussion-1832
Add django-scopes compatible django-admin dumpdata/loaddata commands
2022-06-14 20:56:52 +02:00
vabene1111
4e1f147b37 Merge pull request #1864 from anaymody/patch-1
Update index.md for capitalization and bold-face issues
2022-06-14 20:53:08 +02:00
anaymody
30d0d340c2 Update index.md
Added capitalization to line 52 and proposed some bold-face changes in lines 42, 44. 52. and 54.
2022-06-14 14:30:47 -04:00
vabene1111
d99748638d fixed broken filter on supermarket category lookups 2022-06-14 17:06:25 +02:00
vabene1111
889089b4cd fixed search defaults 2022-06-14 16:49:58 +02:00
vabene1111
e7de6f62b6 fixed permissions and tests 2022-06-14 16:20:37 +02:00
vabene1111
f02eac8ac6 remvoed ability to swipe shopping list as scrolling needs to be fixed 2022-06-14 15:13:46 +02:00
vabene1111
b30c282a13 remove exception details from api response 2022-06-14 15:07:31 +02:00
vabene1111
c2135de941 downgraded vue simple calendar 2022-06-14 12:08:43 +02:00
vabene1111
e2890d1363 Merge branch 'feature/multi-tennancy' into develop 2022-06-13 20:20:49 +02:00
Mike Miller
0dc2abbdd8 Translated using Weblate (German)
Currently translated at 97.8% (405 of 414 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/de/
2022-06-10 19:32:26 +00:00
vabene1111
deeed4b65b testes and fixes for space, userspace and invitelink apis 2022-06-09 22:02:58 +02:00
vabene1111
30e4ee855c switch space method signature change and test 2022-06-09 18:18:57 +02:00
vabene1111
2ab1560aed fixed user name api filter 2022-06-09 17:31:17 +02:00
vabene1111
d5b7d440fe fixed user preference api endpoint 2022-06-08 17:48:23 +02:00
Kaibu
df88b1ddd2 recipe switcher mobile ui height 2022-06-08 17:40:59 +02:00
vabene1111
e368488933 deprecated all old vue stuff and working on tests 2022-06-07 20:08:32 +02:00
vabene1111
37f0f7a0b7 added endpoint for space switching 2022-06-06 18:34:40 +02:00
vabene1111
e2b887b449 lots of fixes and stuff 2022-06-06 18:21:15 +02:00
Daniel
d653b8f9e6 Translated using Weblate (Portuguese (Brazil))
Currently translated at 4.8% (20 of 414 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/pt_BR/
2022-06-05 14:49:41 +00:00
vabene1111
b8f74af41c add supporting options to readme 2022-06-02 16:54:07 +02:00
vabene1111
07f78bb7b8 space management page progress 2022-06-02 16:20:52 +02:00
AliveDevil
1679d820a7 Add django-admin export and import commands, making dump-data and loaddata django-scopes compatible 2022-06-02 14:26:28 +02:00
Oliver Cervera
b3bbb0b156 Translated using Weblate (Italian)
Currently translated at 57.7% (239 of 414 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/it/
2022-06-01 22:32:20 +00:00
Oliver Cervera
8afd73394d Translated using Weblate (Italian)
Currently translated at 82.1% (434 of 528 strings)

Translation: Tandoor/Recipes Backend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-backend/it/
2022-06-01 22:32:20 +00:00
vabene1111
2afab2aec8 invite link basics 2022-06-01 17:42:07 +02:00
vabene1111
f41e4c62d4 space manage users and permissions 2022-06-01 17:01:13 +02:00
vabene1111
c804064155 Merge branch 'develop' into feature/multi-tennancy 2022-06-01 15:36:26 +02:00
vabene1111
eeee36844d Merge pull request #1849 from TandoorRecipes/dependabot/npm_and_yarn/vue/webpack-bundle-tracker-1.5.0
Bump webpack-bundle-tracker from 1.4.0 to 1.5.0 in /vue
2022-06-01 13:47:14 +02:00
vabene1111
d4d4495f2b Merge pull request #1850 from TandoorRecipes/dependabot/npm_and_yarn/vue/typescript-4.7.2
Bump typescript from 4.5.5 to 4.7.2 in /vue
2022-06-01 13:47:05 +02:00
dependabot[bot]
0eee2d8ba5 Bump typescript from 4.5.5 to 4.7.2 in /vue
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.5.5 to 4.7.2.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.5.5...v4.7.2)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-01 05:52:58 +00:00
dependabot[bot]
fbfe00bfec Bump webpack-bundle-tracker from 1.4.0 to 1.5.0 in /vue
Bumps [webpack-bundle-tracker](https://github.com/django-webpack/webpack-bundle-tracker) from 1.4.0 to 1.5.0.
- [Release notes](https://github.com/django-webpack/webpack-bundle-tracker/releases)
- [Commits](https://github.com/django-webpack/webpack-bundle-tracker/compare/1.4.0...1.5.0)

---
updated-dependencies:
- dependency-name: webpack-bundle-tracker
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-01 05:52:00 +00:00
vabene1111
6e70bc3b5d Merge pull request #1848 from TandoorRecipes/dependabot/pip/boto3-1.24.0
Bump boto3 from 1.23.10 to 1.24.0
2022-06-01 07:47:27 +02:00
vabene1111
2dde6ae663 Merge pull request #1846 from TandoorRecipes/dependabot/pip/lxml-4.9.0
Bump lxml from 4.8.0 to 4.9.0
2022-06-01 07:47:20 +02:00
vabene1111
9bda43a670 Merge pull request #1847 from TandoorRecipes/dependabot/pip/pytest-factoryboy-2.4.0
Bump pytest-factoryboy from 2.3.1 to 2.4.0
2022-06-01 07:47:13 +02:00
vabene1111
ba49535bba Merge pull request #1851 from TandoorRecipes/dependabot/npm_and_yarn/vue/vue-cli-plugin-i18n-2.3.1
Bump vue-cli-plugin-i18n from 0.6.1 to 2.3.1 in /vue
2022-06-01 07:47:05 +02:00
vabene1111
21b69f06e5 Merge pull request #1845 from TandoorRecipes/dependabot/pip/recipe-scrapers-14.2.0
Bump recipe-scrapers from 14.1.0 to 14.2.0
2022-06-01 07:46:52 +02:00
dependabot[bot]
1390b01f07 Bump vue-cli-plugin-i18n from 0.6.1 to 2.3.1 in /vue
Bumps [vue-cli-plugin-i18n](https://github.com/intlify/vue-cli-plugin-i18n) from 0.6.1 to 2.3.1.
- [Release notes](https://github.com/intlify/vue-cli-plugin-i18n/releases)
- [Changelog](https://github.com/intlify/vue-cli-plugin-i18n/blob/master/CHANGELOG.md)
- [Commits](https://github.com/intlify/vue-cli-plugin-i18n/compare/v0.6.1...v2.3.1)

---
updated-dependencies:
- dependency-name: vue-cli-plugin-i18n
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-01 00:14:43 +00:00
dependabot[bot]
b9dc0da249 Bump boto3 from 1.23.10 to 1.24.0
Bumps [boto3](https://github.com/boto/boto3) from 1.23.10 to 1.24.0.
- [Release notes](https://github.com/boto/boto3/releases)
- [Changelog](https://github.com/boto/boto3/blob/develop/CHANGELOG.rst)
- [Commits](https://github.com/boto/boto3/compare/1.23.10...1.24.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-01 00:05:18 +00:00
dependabot[bot]
6615bbb532 Bump pytest-factoryboy from 2.3.1 to 2.4.0
Bumps [pytest-factoryboy](https://github.com/pytest-dev/pytest-factoryboy) from 2.3.1 to 2.4.0.
- [Release notes](https://github.com/pytest-dev/pytest-factoryboy/releases)
- [Changelog](https://github.com/pytest-dev/pytest-factoryboy/blob/master/CHANGES.rst)
- [Commits](https://github.com/pytest-dev/pytest-factoryboy/compare/2.3.1...2.4.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-01 00:05:09 +00:00
dependabot[bot]
b8ef6b3888 Bump lxml from 4.8.0 to 4.9.0
Bumps [lxml](https://github.com/lxml/lxml) from 4.8.0 to 4.9.0.
- [Release notes](https://github.com/lxml/lxml/releases)
- [Changelog](https://github.com/lxml/lxml/blob/master/CHANGES.txt)
- [Commits](https://github.com/lxml/lxml/compare/lxml-4.8.0...lxml-4.9.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-01 00:05:03 +00:00
dependabot[bot]
1fc9f74e60 Bump recipe-scrapers from 14.1.0 to 14.2.0
Bumps [recipe-scrapers](https://github.com/hhursev/recipe-scrapers) from 14.1.0 to 14.2.0.
- [Release notes](https://github.com/hhursev/recipe-scrapers/releases)
- [Commits](https://github.com/hhursev/recipe-scrapers/compare/14.1.0...14.2.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>
2022-06-01 00:04:55 +00:00
vabene1111
ded092ed23 baiscs of space edit page 2022-05-31 21:52:59 +02:00
vabene1111
007b7294d9 join and leave spaces 2022-05-31 20:38:53 +02:00
vabene1111
b3fcfdfc96 space switcher 2022-05-31 17:48:43 +02:00
vabene1111
151461508f multi space membership basics 2022-05-31 17:38:12 +02:00
vabene1111
9affc583a3 add token endpoint 2022-05-31 15:43:04 +02:00
vabene1111
cac72df7ba refactored recipe from source endpoint 2022-05-31 15:22:27 +02:00
Bekhruz Khazratov
a6c81d8168 Translated using Weblate (Russian)
Currently translated at 82.6% (342 of 414 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/ru/
2022-05-31 08:32:18 +00:00
Jesse
7aa3e49e8c Translated using Weblate (Dutch)
Currently translated at 100.0% (414 of 414 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/nl/
2022-05-31 08:32:18 +00:00
Jesse
ab378f5332 Translated using Weblate (Dutch)
Currently translated at 100.0% (528 of 528 strings)

Translation: Tandoor/Recipes Backend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-backend/nl/
2022-05-31 08:32:18 +00:00
vabene1111
24b0d7f8e6 removed unused library 2022-05-30 22:10:25 +02:00
vabene1111
5561a9621b copy past 2022-05-30 21:58:22 +02:00
vabene1111
3512ab7515 update wokflow files 2022-05-30 21:53:59 +02:00
vabene1111
12df4abc80 updating ci 2022-05-30 21:48:34 +02:00
vabene1111
f768aef0b9 fixed some breaking changes due to dependency updates 2022-05-30 21:42:30 +02:00
vabene1111
a6dcef4467 Merge pull request #1756 from TandoorRecipes/dependabot/npm_and_yarn/vue/axios-0.27.2
Bump axios from 0.26.1 to 0.27.2 in /vue
2022-05-30 19:56:34 +02:00
dependabot[bot]
699a6a42be Bump axios from 0.26.1 to 0.27.2 in /vue
Bumps [axios](https://github.com/axios/axios) from 0.26.1 to 0.27.2.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/master/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v0.26.1...v0.27.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-30 17:54:21 +00:00
vabene1111
9380e376c6 Merge pull request #1840 from TandoorRecipes/dependabot/pip/whitenoise-6.1.0
Bump whitenoise from 6.0.0 to 6.1.0
2022-05-30 19:53:51 +02:00
dependabot[bot]
04dd51d089 Bump whitenoise from 6.0.0 to 6.1.0
Bumps [whitenoise](https://github.com/evansd/whitenoise) from 6.0.0 to 6.1.0.
- [Release notes](https://github.com/evansd/whitenoise/releases)
- [Changelog](https://github.com/evansd/whitenoise/blob/main/docs/changelog.rst)
- [Commits](https://github.com/evansd/whitenoise/compare/6.0.0...6.1.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-30 17:53:09 +00:00
vabene1111
fe19f81bcd Merge pull request #1838 from TandoorRecipes/dependabot/pip/pillow-9.1.1
Bump pillow from 9.0.1 to 9.1.1
2022-05-30 19:52:48 +02:00
vabene1111
e3711f121f Merge pull request #1841 from TandoorRecipes/dependabot/pip/pytest-factoryboy-2.3.1
Bump pytest-factoryboy from 2.1.0 to 2.3.1
2022-05-30 19:52:34 +02:00
vabene1111
075fd2fd9b Merge pull request #1843 from TandoorRecipes/dependabot/pip/boto3-1.23.10
Bump boto3 from 1.21.31 to 1.23.10
2022-05-30 19:52:20 +02:00
dependabot[bot]
662cfde691 Bump pillow from 9.0.1 to 9.1.1
Bumps [pillow](https://github.com/python-pillow/Pillow) from 9.0.1 to 9.1.1.
- [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/9.0.1...9.1.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-30 17:51:46 +00:00
dependabot[bot]
0a6264228a Bump pytest-factoryboy from 2.1.0 to 2.3.1
Bumps [pytest-factoryboy](https://github.com/pytest-dev/pytest-factoryboy) from 2.1.0 to 2.3.1.
- [Release notes](https://github.com/pytest-dev/pytest-factoryboy/releases)
- [Changelog](https://github.com/pytest-dev/pytest-factoryboy/blob/master/CHANGES.rst)
- [Commits](https://github.com/pytest-dev/pytest-factoryboy/compare/2.1.0...2.3.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-30 17:51:37 +00:00
dependabot[bot]
3f67c6d220 Bump boto3 from 1.21.31 to 1.23.10
Bumps [boto3](https://github.com/boto/boto3) from 1.21.31 to 1.23.10.
- [Release notes](https://github.com/boto/boto3/releases)
- [Changelog](https://github.com/boto/boto3/blob/develop/CHANGELOG.rst)
- [Commits](https://github.com/boto/boto3/compare/1.21.31...1.23.10)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-30 17:51:30 +00:00
vabene1111
4fa6fc10f8 Merge pull request #1839 from TandoorRecipes/dependabot/pip/bleach-5.0.0
Bump bleach from 4.1.0 to 5.0.0
2022-05-30 19:51:08 +02:00
vabene1111
ada811a868 Merge pull request #1837 from TandoorRecipes/dependabot/pip/markdown-3.3.7
Bump markdown from 3.3.6 to 3.3.7
2022-05-30 19:50:55 +02:00
dependabot[bot]
00132c6afa Bump markdown from 3.3.6 to 3.3.7
Bumps [markdown](https://github.com/Python-Markdown/markdown) from 3.3.6 to 3.3.7.
- [Release notes](https://github.com/Python-Markdown/markdown/releases)
- [Commits](https://github.com/Python-Markdown/markdown/compare/3.3.6...3.3.7)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-30 17:50:42 +00:00
dependabot[bot]
da1af693a2 Bump bleach from 4.1.0 to 5.0.0
Bumps [bleach](https://github.com/mozilla/bleach) from 4.1.0 to 5.0.0.
- [Release notes](https://github.com/mozilla/bleach/releases)
- [Changelog](https://github.com/mozilla/bleach/blob/main/CHANGES)
- [Commits](https://github.com/mozilla/bleach/compare/v4.1.0...v5.0.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-30 17:50:31 +00:00
vabene1111
a9d9c03cc0 Merge pull request #1836 from TandoorRecipes/dependabot/pip/recipe-scrapers-14.1.0
Bump recipe-scrapers from 13.32.1 to 14.1.0
2022-05-30 19:50:18 +02:00
vabene1111
0e1522db12 Merge pull request #1835 from TandoorRecipes/dependabot/pip/cryptography-37.0.2
Bump cryptography from 37.0.1 to 37.0.2
2022-05-30 19:50:14 +02:00
vabene1111
df04d6b58d Merge pull request #1834 from TandoorRecipes/dependabot/pip/django-cors-headers-3.12.0
Bump django-cors-headers from 3.11.0 to 3.12.0
2022-05-30 19:50:09 +02:00
vabene1111
b098b6d148 Merge pull request #1833 from TandoorRecipes/dependabot/pip/django-auth-ldap-4.1.0
Bump django-auth-ldap from 4.0.0 to 4.1.0
2022-05-30 19:50:04 +02:00
dependabot[bot]
24bc6a1a8a Bump recipe-scrapers from 13.32.1 to 14.1.0
Bumps [recipe-scrapers](https://github.com/hhursev/recipe-scrapers) from 13.32.1 to 14.1.0.
- [Release notes](https://github.com/hhursev/recipe-scrapers/releases)
- [Commits](https://github.com/hhursev/recipe-scrapers/compare/13.32.1...14.1.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-30 17:48:56 +00:00
dependabot[bot]
64abf6d785 Bump django-cors-headers from 3.11.0 to 3.12.0
Bumps [django-cors-headers](https://github.com/adamchainz/django-cors-headers) from 3.11.0 to 3.12.0.
- [Release notes](https://github.com/adamchainz/django-cors-headers/releases)
- [Changelog](https://github.com/adamchainz/django-cors-headers/blob/main/HISTORY.rst)
- [Commits](https://github.com/adamchainz/django-cors-headers/compare/3.11.0...3.12.0)

---
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>
2022-05-30 17:48:56 +00:00
vabene1111
f156722456 Merge pull request #1752 from TandoorRecipes/dependabot/pip/pytest-7.1.2
Bump pytest from 7.1.1 to 7.1.2
2022-05-30 19:48:16 +02:00
dependabot[bot]
d641a3fa48 Bump cryptography from 37.0.1 to 37.0.2
Bumps [cryptography](https://github.com/pyca/cryptography) from 37.0.1 to 37.0.2.
- [Release notes](https://github.com/pyca/cryptography/releases)
- [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pyca/cryptography/compare/37.0.1...37.0.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-30 17:47:17 +00:00
dependabot[bot]
29760defd0 Bump django-auth-ldap from 4.0.0 to 4.1.0
Bumps [django-auth-ldap](https://github.com/django-auth-ldap/django-auth-ldap) from 4.0.0 to 4.1.0.
- [Release notes](https://github.com/django-auth-ldap/django-auth-ldap/releases)
- [Changelog](https://github.com/django-auth-ldap/django-auth-ldap/blob/master/docs/changes.rst)
- [Commits](https://github.com/django-auth-ldap/django-auth-ldap/compare/4.0.0...4.1.0)

---
updated-dependencies:
- dependency-name: django-auth-ldap
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-30 17:47:16 +00:00
dependabot[bot]
5eb822089d Bump pytest from 7.1.1 to 7.1.2
Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.1.1 to 7.1.2.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/7.1.1...7.1.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-30 17:47:07 +00:00
vabene1111
53414ec1df Merge pull request #1753 from TandoorRecipes/dependabot/pip/jinja2-3.1.2
Bump jinja2 from 3.1.1 to 3.1.2
2022-05-30 19:46:47 +02:00
vabene1111
cd3f0ba739 Merge pull request #1751 from TandoorRecipes/dependabot/pip/beautifulsoup4-4.11.1
Bump beautifulsoup4 from 4.10.0 to 4.11.1
2022-05-30 19:46:42 +02:00
vabene1111
74152d2409 Merge pull request #1750 from TandoorRecipes/dependabot/pip/django-scopes-1.2.0.post1
Bump django-scopes from 1.2.0 to 1.2.0.post1
2022-05-30 19:46:37 +02:00
dependabot[bot]
8f7a4a31c8 Bump beautifulsoup4 from 4.10.0 to 4.11.1
Bumps [beautifulsoup4](https://www.crummy.com/software/BeautifulSoup/bs4/) from 4.10.0 to 4.11.1.

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-30 17:46:32 +00:00
dependabot[bot]
c5f11c1625 Bump jinja2 from 3.1.1 to 3.1.2
Bumps [jinja2](https://github.com/pallets/jinja) from 3.1.1 to 3.1.2.
- [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.1...3.1.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-30 17:46:20 +00:00
vabene1111
f0eb295696 Merge pull request #1754 from TandoorRecipes/dependabot/pip/django-webpack-loader-1.5.0
Bump django-webpack-loader from 1.4.1 to 1.5.0
2022-05-30 19:45:54 +02:00
vabene1111
c86fe0690b Merge pull request #1755 from TandoorRecipes/dependabot/npm_and_yarn/vue/workbox-precaching-6.5.3
Bump workbox-precaching from 6.5.2 to 6.5.3 in /vue
2022-05-30 19:45:50 +02:00
vabene1111
2f088d03bb Merge pull request #1757 from TandoorRecipes/dependabot/npm_and_yarn/vue/vue-cookies-1.8.1
Bump vue-cookies from 1.7.4 to 1.8.1 in /vue
2022-05-30 19:45:42 +02:00
vabene1111
1195dd445a Merge pull request #1759 from TandoorRecipes/dependabot/npm_and_yarn/vue/eslint-plugin-vue-8.7.1
Bump eslint-plugin-vue from 8.5.0 to 8.7.1 in /vue
2022-05-30 19:45:36 +02:00
vabene1111
71c5835909 Added translation using Weblate (Ukrainian) 2022-05-30 16:42:02 +00:00
vabene1111
423e042492 Added translation using Weblate (Ukrainian) 2022-05-30 16:41:36 +00:00
Oleh Astappiev
37c87b4375 fix: ingredients table out of page bounds 2022-05-29 18:25:18 +02:00
Oleh Astappiev
43666e1f63 fix: improve recipe toolbar visualization on mobile and position of elements 2022-05-29 17:42:40 +02:00
Oleh Astappiev
d5dd64acd2 fix: improve buttons visualization on mobile 2022-05-29 17:41:51 +02:00
Oleh Astappiev
b0c3ea0934 fix: make menu icons centered on mobile 2022-05-29 17:16:18 +02:00
Oleh Astappiev
ab446590a2 fix: add some space in multi-row lists of elements on mobile 2022-05-29 17:02:21 +02:00
Oleh Astappiev
3478ff17f8 fix: recipe's step header out of view on mobile in edit mode 2022-05-29 16:56:13 +02:00
Frank Poppe
932e7c8912 Translated using Weblate (Spanish)
Currently translated at 37.4% (155 of 414 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/es/
2022-05-28 16:32:21 +00:00
Frank Poppe
6e7a769d79 Translated using Weblate (German)
Currently translated at 89.6% (371 of 414 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/de/
2022-05-28 16:32:21 +00:00
Frank Poppe
8602de6ce1 Translated using Weblate (Spanish)
Currently translated at 52.6% (278 of 528 strings)

Translation: Tandoor/Recipes Backend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-backend/es/
2022-05-28 16:32:21 +00:00
Tobias Reinmann
faee71943f Translated using Weblate (German)
Currently translated at 90.9% (480 of 528 strings)

Translation: Tandoor/Recipes Backend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-backend/de/
2022-05-28 16:32:21 +00:00
vabene1111
0e2a27ad41 Merge branch 'develop' 2022-05-25 18:53:18 +02:00
vabene1111
c064e8970f compiled messages 2022-05-25 17:58:29 +02:00
Krisztian Doka
b8ef7ae39d Translated using Weblate (Hungarian)
Currently translated at 92.2% (487 of 528 strings)

Translation: Tandoor/Recipes Backend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-backend/hu/
2022-05-24 20:32:14 +00:00
Krisztian Doka
702f3de061 Added translation using Weblate (Hungarian) 2022-05-23 19:50:50 +00:00
Ramon Aixa Juan
f278d7f6d0 Translated using Weblate (Spanish)
Currently translated at 8.2% (34 of 414 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/es/
2022-05-23 11:32:17 +00:00
Ramon Aixa Juan
221c1b523b Translated using Weblate (Spanish)
Currently translated at 52.2% (276 of 528 strings)

Translation: Tandoor/Recipes Backend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-backend/es/
2022-05-23 11:32:17 +00:00
Ramon Aixa Juan
d00b6a2e85 Translated using Weblate (Catalan)
Currently translated at 91.0% (481 of 528 strings)

Translation: Tandoor/Recipes Backend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-backend/ca/
2022-05-22 11:20:51 +00:00
César Blanco Guillamon
e03c285f14 Translated using Weblate (Spanish)
Currently translated at 5.3% (22 of 414 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/es/
2022-05-21 17:32:19 +00:00
Tomasz Klimczak
0ec1f334c0 Translated using Weblate (Polish)
Currently translated at 100.0% (414 of 414 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/pl/
2022-05-21 17:32:19 +00:00
Laura
b637cbeabc Translated using Weblate (French)
Currently translated at 90.3% (374 of 414 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/fr/
2022-05-21 17:32:18 +00:00
César Blanco Guillamon
943f873855 Translated using Weblate (Spanish)
Currently translated at 51.3% (271 of 528 strings)

Translation: Tandoor/Recipes Backend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-backend/es/
2022-05-19 10:10:33 +00:00
César Blanco Guillamon
49cebb400a Added translation using Weblate (Spanish) 2022-05-19 10:10:33 +00:00
Anu
0ed9225c05 Grammatical errors
Spotted several errors in sentence structure, punctuation, capitalization and other grammatical issues. Most changes are minor and any sentences that have been restructured have been re-written with great contemplation to keep the original meaning intact. This is my first open source contribution attempt so please let me know if this is appropriate. I am willing to help improve other pages of the docs as well if this work is considered helpful!
2022-05-19 00:27:24 +05:30
vabene1111
991fbdad3a fixed localization of create shopping auto form 2022-05-18 16:49:25 +02:00
vabene1111
34e95cd25b improved mobile rendering on ingerdient editor 2022-05-18 16:44:27 +02:00
vabene1111
8bc06fef34 Merge branch 'develop' of https://github.com/vabene1111/recipes into develop 2022-05-18 16:27:11 +02:00
vabene1111
6aba5c3661 fixed plan to eat tag delimeter 2022-05-18 16:27:07 +02:00
vabene1111
876bd49ee5 Merge pull request #1793 from smilerz/url_import_test
fixed spuce eats test
2022-05-18 16:25:30 +02:00
vabene1111
9435c5a380 changed order for reverse auth middleware 2022-05-18 16:09:37 +02:00
vabene1111
94c915e23a fixed advanced search field configuration cookie expiery 2022-05-18 16:06:55 +02:00
vabene1111
9ac8641c13 dont make first step header as default if others are not 2022-05-18 15:55:58 +02:00
vabene1111
0fe06cf2df fixed random search ordering 2022-05-18 15:54:02 +02:00
vabene1111
f872f994f1 fixed import failure with leading commas in input strings 2022-05-18 15:29:03 +02:00
vabene1111
87c2ff73e8 Merge branch 'develop' 2022-05-18 14:38:01 +02:00
Gabriel Tapias
27bb4c9bb8 Translated using Weblate (Spanish)
Currently translated at 48.1% (254 of 528 strings)

Translation: Tandoor/Recipes Backend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-backend/es/
2022-05-17 21:32:15 +00:00
dependabot[bot]
c10e0fd7bc Bump eslint-plugin-vue from 8.5.0 to 8.7.1 in /vue
Bumps [eslint-plugin-vue](https://github.com/vuejs/eslint-plugin-vue) from 8.5.0 to 8.7.1.
- [Release notes](https://github.com/vuejs/eslint-plugin-vue/releases)
- [Commits](https://github.com/vuejs/eslint-plugin-vue/compare/v8.5.0...v8.7.1)

---
updated-dependencies:
- dependency-name: eslint-plugin-vue
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-17 20:13:02 +00:00
dependabot[bot]
48d302020c Bump vue-cookies from 1.7.4 to 1.8.1 in /vue
Bumps [vue-cookies](https://github.com/cmp-cc/vue-cookies) from 1.7.4 to 1.8.1.
- [Release notes](https://github.com/cmp-cc/vue-cookies/releases)
- [Commits](https://github.com/cmp-cc/vue-cookies/compare/v1.7.4...v1.8.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-17 20:12:23 +00:00
dependabot[bot]
b31b3ccd23 Bump workbox-precaching from 6.5.2 to 6.5.3 in /vue
Bumps [workbox-precaching](https://github.com/googlechrome/workbox) from 6.5.2 to 6.5.3.
- [Release notes](https://github.com/googlechrome/workbox/releases)
- [Commits](https://github.com/googlechrome/workbox/compare/v6.5.2...v6.5.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-17 20:11:21 +00:00
vabene1111
ac647c5ee8 more JS nonsense 2022-05-17 22:00:36 +02:00
vabene1111
3cec891aa1 added missing dependency 2022-05-17 21:57:43 +02:00
vabene1111
3633b9724b fixed image deletion error 2022-05-17 21:53:10 +02:00
vabene1111
420b5c093f updated some dependencies 2022-05-17 21:43:52 +02:00
vabene1111
9bb55dd746 Merge pull request #1758 from TandoorRecipes/dependabot/npm_and_yarn/vue/kangc/v-md-editor-1.7.11
Bump @kangc/v-md-editor from 1.7.9 to 1.7.11 in /vue
2022-05-17 21:38:00 +02:00
dependabot[bot]
1759ad3587 Bump @kangc/v-md-editor from 1.7.9 to 1.7.11 in /vue
Bumps [@kangc/v-md-editor](https://github.com/code-farmer-i/vue-markdown-editor) from 1.7.9 to 1.7.11.
- [Release notes](https://github.com/code-farmer-i/vue-markdown-editor/releases)
- [Changelog](https://github.com/code-farmer-i/vue-markdown-editor/blob/dev/docs/changelog.md)
- [Commits](https://github.com/code-farmer-i/vue-markdown-editor/compare/v1.7.9...v1.7.11)

---
updated-dependencies:
- dependency-name: "@kangc/v-md-editor"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-17 19:30:34 +00:00
vabene1111
956693b7ca changed view mode of file viewer downloadable files
changed it so that the file is always downloaded so that opened files do not open in the application context (to prevent possible XSS issues)
2022-05-17 21:27:40 +02:00
vabene1111
7b2117c019 improved output sanitization of several views 2022-05-17 21:24:27 +02:00
vabene1111
d48fe26a35 added url validation to all server requests 2022-05-17 18:04:43 +02:00
Kaibu
7fd5fca0cf changed mobile logo to png version aswell 2022-05-13 15:11:04 +02:00
smilerz
37e215a4ea fixed spuce eats test 2022-05-11 14:18:14 -05:00
dependabot[bot]
ab5400efad Bump django-webpack-loader from 1.4.1 to 1.5.0
Bumps [django-webpack-loader](https://github.com/django-webpack/django-webpack-loader) from 1.4.1 to 1.5.0.
- [Release notes](https://github.com/django-webpack/django-webpack-loader/releases)
- [Changelog](https://github.com/django-webpack/django-webpack-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/django-webpack/django-webpack-loader/compare/1.4.1...1.5.0)

---
updated-dependencies:
- dependency-name: django-webpack-loader
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-11 18:43:24 +00:00
dependabot[bot]
258ecd476c Bump django-scopes from 1.2.0 to 1.2.0.post1
Bumps [django-scopes](https://github.com/raphaelm/django-scopes) from 1.2.0 to 1.2.0.post1.
- [Release notes](https://github.com/raphaelm/django-scopes/releases)
- [Commits](https://github.com/raphaelm/django-scopes/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-11 18:43:07 +00:00
vabene1111
378938812c update recipe scrapers 2022-05-11 20:42:28 +02:00
vabene1111
60b494abeb workflow name 2022-05-11 20:30:17 +02:00
vabene1111
34be1dc1d7 removed notification from raspi build 2022-05-11 20:14:53 +02:00
vabene1111
d89a4620f0 meal plan remove old add to shopping 2022-05-11 19:59:04 +02:00
vabene1111
dea83b5720 fixed duplication of values in recipe editor 2022-05-11 19:31:44 +02:00
vabene1111
d9ebe3e0fb fixed original text rendering in recipe edito view 2022-05-11 19:25:48 +02:00
vabene1111
135dde247f fixed static path generation 2022-05-11 19:17:40 +02:00
vabene1111
eb7a667202 fixed cookmate importer 2022-05-11 19:10:56 +02:00
Kaibu
b3cc9967f5 Merge branch 'develop' of https://github.com/TandoorRecipes/recipes into develop 2022-05-11 17:10:18 +02:00
Kaibu
7276cea3d5 multiple ux fixes 2022-05-11 17:10:12 +02:00
vabene1111
c0c996622e made shopping new entry translatable 2022-05-11 17:06:34 +02:00
vabene1111
5556555bca fixed paprika servings import 2022-05-11 17:05:47 +02:00
vabene1111
55a84494c9 fixed issue with plan to eat importer 2022-05-11 16:53:20 +02:00
vabene1111
74d778dcb8 compiled messages 2022-05-11 16:45:34 +02:00
vabene1111
156d68f1b8 added link to shopping recipes 2022-05-11 16:42:52 +02:00
vabene1111
cb59a6340d Merge pull request #1788 from gloriousDan/fix-import
Fix import with recipe-scrapers
2022-05-11 16:37:41 +02:00
vabene1111
5eb013cc2f Merge branch 'develop' of https://github.com/vabene1111/recipes into develop 2022-05-11 16:22:18 +02:00
vabene1111
dafb26b500 updated raspi docs 2022-05-11 16:22:13 +02:00
vabene1111
d9416a42dc Merge pull request #1786 from gloriousDan/dockerfile-armv7
Build pillow for armv7/ raspi
2022-05-11 16:17:45 +02:00
Jesse
ad88eff9e3 Translated using Weblate (Dutch)
Currently translated at 100.0% (528 of 528 strings)

Translation: Tandoor/Recipes Backend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-backend/nl/
2022-05-10 15:32:17 +00:00
zeon
4d4f623adf Translated using Weblate (Bulgarian)
Currently translated at 100.0% (412 of 412 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/bg/
2022-05-10 15:32:16 +00:00
Mathias Rasmussen
ac9c9cd4e3 Translated using Weblate (Danish)
Currently translated at 100.0% (528 of 528 strings)

Translation: Tandoor/Recipes Backend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-backend/da/
2022-05-10 15:32:15 +00:00
Jesse
580eeef6b7 Translated using Weblate (Dutch)
Currently translated at 100.0% (412 of 412 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/nl/
2022-05-10 15:32:13 +00:00
zeon
f25f5a26cf Translated using Weblate (Bulgarian)
Currently translated at 100.0% (528 of 528 strings)

Translation: Tandoor/Recipes Backend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-backend/bg/
2022-05-10 15:32:11 +00:00
Mathias Rasmussen
972d43c2a2 Translated using Weblate (Danish)
Currently translated at 100.0% (412 of 412 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/da/
2022-05-10 15:32:09 +00:00
Daniel Schulz
2a7475c435 Call scrape_me first when scraping from url 2022-05-10 00:08:37 +02:00
Daniel Schulz
71b41efe6c Build pillow for armv7/ raspi 2022-05-09 13:24:59 +02:00
zeon
33a7fee1cc Added translation using Weblate (Bulgarian) 2022-05-08 21:25:53 +00:00
zeon
fa7fb644ea Added translation using Weblate (Bulgarian) 2022-05-08 20:44:02 +00:00
Mathias Rasmussen
13b996171a Translated using Weblate (Danish)
Currently translated at 1.9% (8 of 412 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/da/
2022-05-07 16:49:26 +00:00
Kim Dannemand
77bb3870bf Translated using Weblate (Danish)
Currently translated at 1.9% (8 of 412 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/da/
2022-05-07 16:49:26 +00:00
vabene1111
9863303a5e Merge remote-tracking branch 'origin/develop' into develop 2022-05-06 20:32:14 +02:00
vabene1111
0caccc3da8 updated it and ru languages 2022-05-06 20:31:57 +02:00
vabene1111
b75427b86d Added translation using Weblate (Danish) 2022-05-06 18:30:41 +00:00
vabene1111
054c4ec61a Added translation using Weblate (Danish) 2022-05-06 18:30:05 +00:00
vabene1111
8da21f9914 added specific build files for raspi (armv7) 2022-05-06 20:28:20 +02:00
vabene1111
99ba512862 Merge branch 'beta' into develop 2022-05-06 20:24:27 +02:00
vabene1111
eab59fcbd8 Update docker-publish-latest-raspi.yml 2022-05-06 16:08:13 +02:00
vabene1111
484da2200e added some debug to auto add shopping signal 2022-05-06 15:34:28 +02:00
vabene1111
330bb6d954 testing extra raspi build 2022-05-06 15:07:54 +02:00
axeron2036
d4b6c8da04 Translated using Weblate (Russian)
Currently translated at 80.3% (331 of 412 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/ru/
2022-05-06 06:32:14 +00:00
Tomasz Klimczak
a5ef438cfe Translated using Weblate (Polish)
Currently translated at 100.0% (412 of 412 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/pl/
2022-05-04 19:32:09 +00:00
vabene1111
de196c716b build test openssl 2022-05-04 20:33:27 +02:00
vabene1111
cb248a1f19 beta build test libressl 2022-05-04 20:33:10 +02:00
vabene1111
df2f1b2b7c testing armv7 build solutuin
taken from https://github.com/healthchecks/healthchecks/issues/568#issuecomment-942047344
2022-05-04 17:18:25 +02:00
vabene1111
36e26d8009 Merge branch 'master' into beta 2022-05-04 17:18:08 +02:00
vabene1111
a5973de02b Merge branch 'develop' 2022-05-04 17:11:35 +02:00
vabene1111
68f272bc25 fixed adding supermarket category to supermarket frontend desync 2022-05-04 15:20:40 +02:00
vabene1111
b66a5c1ee9 Merge branch 'develop' 2022-05-04 15:01:14 +02:00
vabene1111
bfc42638a4 fixed supermarket category ordering 2022-05-04 15:00:39 +02:00
vabene1111
a8c9689b43 fixed ability to disabled auto sync 2022-05-04 14:47:53 +02:00
vabene1111
26ff3f56ea Merge branch 'develop' into beta 2022-05-03 16:58:44 +02:00
vabene1111
a49993e399 testing new cryptography version 2022-05-03 16:58:39 +02:00
Tomasz Klimczak
9f42226224 Translated using Weblate (Polish)
Currently translated at 100.0% (395 of 395 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/pl/
2022-05-02 22:32:09 +00:00
vabene1111
8f4c00df0b use old property as other sometimes fails 2022-05-02 15:52:15 +02:00
vabene1111
6cebec86c5 Merge branch 'master' into develop 2022-05-02 15:25:47 +02:00
vabene1111
8f5b017857 dont build arm 2022-05-01 21:51:57 +02:00
vabene1111
9915a3eebf Merge branch 'develop' 2022-05-01 13:09:48 +02:00
vabene1111
19c2d3bcf1 shopping description 2022-05-01 13:03:36 +02:00
vabene1111
9259f306ec final importer touches 2022-05-01 12:51:37 +02:00
vabene1111
483bc8f1b7 Merge branch 'develop' into beta 2022-04-29 21:58:13 +02:00
vabene1111
4f33101319 fixed empty step time error 2022-04-29 21:57:05 +02:00
vabene1111
3cef470134 made and compiled messages 2022-04-29 18:42:33 +02:00
vabene1111
ba493e3e19 Merge branch 'develop' into beta 2022-04-25 09:40:04 +02:00
Kaibu
93c53e5fc8 Merge branch 'develop' of https://github.com/vabene1111/recipes into develop 2022-04-24 12:52:06 +02:00
Kaibu
d931feadf5 supermarkets rework mostly done 2022-04-24 12:52:00 +02:00
vabene1111
fe32ff15b3 another toast fix 2022-04-24 12:46:17 +02:00
vabene1111
a44dea64b8 fixed toast error 2022-04-23 20:55:01 +02:00
Kaibu
54af76e9cf Merge branch 'develop' of https://github.com/vabene1111/recipes into develop
# Conflicts:
#	vue/src/apps/ShoppingListView/ShoppingListView.vue
2022-04-23 20:45:35 +02:00
Kaibu
fcfef255c1 shopping list supermarket rework 2022-04-23 20:44:46 +02:00
vabene1111
2914c20522 added space tier banner 2022-04-23 20:18:10 +02:00
vabene1111
825b7b7cf9 ingredient editor and parser 2022-04-23 19:58:40 +02:00
vabene1111
b9fb78c24d Merge pull request #1739 from ndbeals/develop
Fix image upload handler to use content-type
2022-04-23 19:55:08 +02:00
vabene1111
2fbce7d84d Merge pull request #1734 from Drumstickx/develop
Fix link in German locale
2022-04-23 19:53:47 +02:00
vabene1111
69a23f34b4 updated tests ingredient pagination 2022-04-23 18:54:23 +02:00
vabene1111
9f90306f6c at least basic ui for ingredient editor 2022-04-23 17:13:27 +02:00
vabene1111
1fb6f96571 minor shopping tweaks 2022-04-23 16:51:04 +02:00
vabene1111
0b8dd63510 small fixes 2022-04-23 15:27:21 +02:00
Kaibu
b79bc0d9a8 Merge branch 'develop' of https://github.com/vabene1111/recipes into develop 2022-04-23 14:47:14 +02:00
Kaibu
8149192455 shopping list and import view ux 2022-04-23 14:47:10 +02:00
vabene1111
66c0cc070a removed old shopping list 2022-04-23 14:43:03 +02:00
vabene1111
e2ab3a0efb fixed ingredient parser length issues 2022-04-23 14:15:06 +02:00
vabene1111
e0b7d1a8f0 added support for unit/amount at end of ingredient 2022-04-23 13:53:04 +02:00
vabene1111
012a1a7915 ingredient parser produces expected results again 2022-04-23 13:03:15 +02:00
Nathan Beals
2af36a3db4 Merge branch 'develop' of github.com:ndbeals/tandoor_recipes into develop 2022-04-23 00:11:08 -04:00
Nathan Beals
8df3009cb2 Update image upload handler to be content-type aware
Update handle_image: made filetype required and not optional
Updated handle_image usage to reflect changes
2022-04-23 00:11:04 -04:00
Kaibu
161ae9879a import app view refactor 2022-04-23 03:02:46 +02:00
vabene1111
71a60a46be Translated using Weblate (German)
Currently translated at 96.8% (372 of 384 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/de/
2022-04-23 00:54:22 +00:00
Kaibu
93acac1f3b Translated using Weblate (German)
Currently translated at 96.8% (372 of 384 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/de/
2022-04-23 00:54:22 +00:00
vabene1111
b4ebd98ee8 ingredient editor paginatio 2022-04-23 02:28:26 +02:00
vabene1111
78c0c5c213 ingredient editor improve merge/delete add edit 2022-04-23 02:17:40 +02:00
vabene1111
30d5587fbe added err msg to all standard toasts 2022-04-23 01:41:08 +02:00
vabene1111
e4223787be updated standard toast function 2022-04-23 01:31:15 +02:00
vabene1111
3850287deb WSL docs 2022-04-23 01:28:56 +02:00
Kaibu
7fae95e248 Merge branch 'develop' of https://github.com/vabene1111/recipes into develop 2022-04-23 01:28:25 +02:00
Kaibu
b037203b8f ui improvements (shopping and meal plan)
- fixed content scaling for meal plan and shopping
- style fixes on shopping list
- touch based swipe actions for shopping list
- better mobile experience overall
2022-04-23 01:28:20 +02:00
vabene1111
9b132e71f2 screw up ingredient parser 2022-04-23 01:21:13 +02:00
vabene1111
1a21659b5e Merge pull request #1737 from TandoorRecipes/dependabot/pip/django-3.2.13
Bump django from 3.2.12 to 3.2.13
2022-04-23 01:01:40 +02:00
dependabot[bot]
1a1dd092d0 Bump django from 3.2.12 to 3.2.13
Bumps [django](https://github.com/django/django) from 3.2.12 to 3.2.13.
- [Release notes](https://github.com/django/django/releases)
- [Commits](https://github.com/django/django/compare/3.2.12...3.2.13)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-22 22:45:49 +00:00
vabene1111
9adc1f7266 small fixes and tests 2022-04-22 22:27:17 +02:00
vabene1111
6953f763d2 improved source url field rendering 2022-04-22 21:13:00 +02:00
vabene1111
4ecf77f431 Merge branch 'feature/importer_to_vue' into develop
# Conflicts:
#	vue/src/apps/RecipeView/RecipeView.vue
2022-04-22 21:07:02 +02:00
vabene1111
c4f5b160a6 show original text in recipe editor 2022-04-22 21:05:23 +02:00
vabene1111
d8f6dbc58f import list to textarea 2022-04-22 21:00:59 +02:00
vabene1111
8d3747a304 added missing doc entries 2022-04-22 20:30:05 +02:00
vabene1111
1740913a14 improve experience when importing multiple recipes 2022-04-22 20:19:39 +02:00
vabene1111
3cf0395a18 lots of small fixes 2022-04-22 19:26:49 +02:00
Kaibu
42dfc9d126 source url added 2022-04-22 18:53:23 +02:00
Kaibu
d7bd731c73 minor ui fix in recipe view 2022-04-22 17:43:23 +02:00
Kaibu
9e86abb004 Merge branch 'develop' of https://github.com/vabene1111/recipes into develop 2022-04-22 17:33:33 +02:00
Kaibu
dc8ce0f6a4 recipe image max-width based on ingredient table 2022-04-22 17:33:27 +02:00
vabene1111
2ddb0c719a Merge branch 'develop' into feature/importer_to_vue
# Conflicts:
#	vue/src/apps/RecipeEditView/RecipeEditView.vue
#	vue/src/utils/openapi/api.ts
2022-04-22 16:41:13 +02:00
Tomasz Klimczak
05383a2bc3 Translated using Weblate (Polish)
Currently translated at 100.0% (384 of 384 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/pl/
2022-04-21 19:14:53 +00:00
Drumstickx
48c0252893 Fix link in German locale 2022-04-21 18:51:38 +02:00
Tomasz Klimczak
82fd6f1860 Translated using Weblate (Polish)
Currently translated at 100.0% (383 of 383 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/pl/
2022-04-19 04:18:02 +00:00
Kaibu
694022506d Merge branch 'develop' of https://github.com/vabene1111/recipes into develop 2022-04-18 14:13:30 +02:00
Kaibu
45a86a22e3 recipe switcher and navbar fixes
also added left_hand to global preferences
2022-04-18 14:13:23 +02:00
vabene1111
1100826ed8 fixed NC importer importing empty keywords 2022-04-18 12:52:32 +02:00
vabene1111
d1065c8ac4 Merge pull request #1710 from hendrikbl/feature/navbar-tweaks
Navbar tweaks
2022-04-18 12:37:45 +02:00
vabene1111
2fdd9edde1 Merge pull request #1731 from parkroland/enhancement/clickable-keywords-recipe-card
Add clickable keywords to recipe card
2022-04-18 12:33:10 +02:00
Roland Park
a84ab0c049 Add clickable keywords to recipe card 2022-04-17 19:56:36 -04:00
vabene1111
d9dd0a594e show recipe and allow delete in ingredient editor 2022-04-17 23:25:22 +02:00
vabene1111
f0d59a8c9c added ability to open ingredient editor from food/unit list 2022-04-17 22:43:33 +02:00
vabene1111
d50fb69ce9 fixed errro message in meal plan when adding notes with add to shopping 2022-04-17 15:48:18 +02:00
vabene1111
8bc13fc91f fixed env template email settings 2022-04-17 15:35:41 +02:00
vabene1111
2ce06a8154 fixed too small fractions dissappearing 2022-04-17 15:35:32 +02:00
vabene1111
0a0c0b069f fixed space management page template error 2022-04-17 15:03:50 +02:00
vabene1111
47b62aa390 Merge pull request #1714 from gloriousDan/docs_nginx_read_only
Docs: nginx mount volumes read-only
2022-04-17 14:59:57 +02:00
vabene1111
9a2f91d3d4 Merge pull request #1709 from gloriousDan/develop
Docs: Reintroduce restart-always to web_recipes service
2022-04-17 14:58:55 +02:00
vabene1111
2df940ee40 improved rezkonv importer 2022-04-17 14:55:30 +02:00
Oskar Stenberg
67a5d8f1bd 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/
2022-04-17 00:32:01 +00:00
vabene1111
297a8d4c8b ingredient editor basics done 2022-04-14 22:45:31 +02:00
vabene1111
976bce5fdd add merge capability to ingredient editor 2022-04-14 22:10:48 +02:00
vabene1111
8c89438b97 allow delete in ingredient editor 2022-04-14 14:40:15 +02:00
vabene1111
7ca7bd6111 improve generic form delete 2022-04-14 14:31:34 +02:00
Veit Kunz
095befd9b7 Fix some issues to improve the print output 2022-04-14 14:26:36 +02:00
vabene1111
3159868ba4 moved generic multiselect create function into component 2022-04-14 14:08:16 +02:00
vabene1111
7befa4a084 added basic ingredient editor 2022-04-14 13:01:27 +02:00
vabene1111
2ee96c2ea4 docs run on master, update contrib. docs 2022-04-14 08:53:16 +02:00
vabene1111
74b67e5549 Merge pull request #1719 from tristanlins/develop
Remove namespace vom k8s templates
2022-04-14 08:40:51 +02:00
vabene1111
1e24161d4c Merge pull request #1711 from Makanz/add-swedish-language-support
Add swedish language support
2022-04-14 08:39:29 +02:00
Tristan Lins
a839fb0bfc Remove namespace vom k8s templates 2022-04-12 20:43:58 +02:00
cesar ferreira
46267a135b Translated using Weblate (Portuguese)
Currently translated at 7.8% (30 of 381 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/pt/
2022-04-12 18:32:03 +00:00
Tomasz Klimczak
f7ab0400a3 Translated using Weblate (Polish)
Currently translated at 100.0% (381 of 381 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/pl/
2022-04-12 18:32:02 +00:00
Marcus Alsterfjord
74863117c5 Translated using Weblate (Swedish)
Currently translated at 100.0% (381 of 381 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/sv/
2022-04-12 18:32:01 +00:00
Marcus Alsterfjord
e872272fbd 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/
2022-04-12 18:32:00 +00:00
Daniel
9ae7d591cc Merge branch 'TandoorRecipes:develop' into docs_nginx_read_only 2022-04-10 20:46:46 +02:00
Daniel Schulz
c3c697f4a8 Mount all volumes in nginx read-only 2022-04-10 20:45:34 +02:00
Tomasz Klimczak
60e8b95593 Translated using Weblate (Polish)
Currently translated at 88.1% (336 of 381 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/pl/
2022-04-10 09:51:32 +00:00
Marcus Alsterfjord
1636710099 Translated using Weblate (Swedish)
Currently translated at 61.7% (229 of 371 strings)

Translation: Tandoor/Recipes Backend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-backend/sv/
2022-04-10 09:51:31 +00:00
Rubens
4296c3d136 Translated using Weblate (Catalan)
Currently translated at 96.4% (542 of 562 strings)

Translation: Tandoor/Recipes Backend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-backend/ca/
2022-04-10 09:51:31 +00:00
Marcus Alsterfjord
bcda5eea93 Update CONTRIBUTERS.md 2022-04-09 16:52:18 +02:00
Marcus Alsterfjord
a63ede0e3a Add swedish support in frontend ui and in search 2022-04-09 16:51:16 +02:00
hendrikbl
a9414065b5 changed navbar logo size and order 2022-04-09 16:15:10 +02:00
Daniel Schulz
fa79adf931 Reintroduce restart-always to web_recipes service 2022-04-09 14:56:00 +02:00
Marcus Alsterfjord
cd5f752d26 Translated using Weblate (Swedish)
Currently translated at 85.8% (327 of 381 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/sv/
2022-04-08 22:32:07 +00:00
Rubens
6a41b182f5 Translated using Weblate (Catalan)
Currently translated at 79.8% (449 of 562 strings)

Translation: Tandoor/Recipes Backend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-backend/ca/
2022-04-08 22:32:07 +00:00
vabene1111
0011ce26d3 Merge pull request #1705 from amillerr/patch-1
Update CONTRIBUTERS.md
2022-04-08 08:03:29 +02:00
Artem Aksenov
1ef92df83c Translated using Weblate (Russian)
Currently translated at 8.8% (44 of 496 strings)

Translation: Tandoor/Recipes Backend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-backend/ru/
2022-04-07 19:32:01 +00:00
Artem Aksenov
3e8ef33402 Translated using Weblate (Russian)
Currently translated at 54.3% (207 of 381 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/ru/
2022-04-07 19:32:00 +00:00
Rubens
4d4c3bea92 Translated using Weblate (Catalan)
Currently translated at 56.5% (318 of 562 strings)

Translation: Tandoor/Recipes Backend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-backend/ca/
2022-04-07 19:32:00 +00:00
Artyom Aksyonov
9ecbfb0655 Update CONTRIBUTERS.md 2022-04-07 21:58:39 +03:00
Jesse
944492168e Translated using Weblate (Dutch)
Currently translated at 100.0% (378 of 378 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/nl/
2022-04-05 10:32:03 +00:00
Jesse
1c39befa0f Translated using Weblate (Dutch)
Currently translated at 100.0% (562 of 562 strings)

Translation: Tandoor/Recipes Backend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-backend/nl/
2022-04-05 10:32:03 +00:00
vabene1111
57ec6a2b3d import servings text 2022-04-04 23:21:13 +02:00
vabene1111
3653d6b911 added source url to nextcloud cookbook 2022-04-04 22:55:00 +02:00
Kaibu
82c2cc0f40 ui improvements 2022-04-04 22:53:26 +02:00
vabene1111
48e9f3f8a9 added cookmate importer 2022-04-04 22:49:50 +02:00
vabene1111
12865437d7 copy me that improvements 2022-04-04 21:44:51 +02:00
vabene1111
090e18e405 paprika importer improvements 2022-04-04 21:30:00 +02:00
vabene1111
7db49b1528 Merge pull request #1698 from HarHarLinks/patch-1
fix links in german locale
2022-04-04 21:16:06 +02:00
vabene1111
85aad42529 added mela recipes importer 2022-04-04 21:09:47 +02:00
Kim Brose
9c254be4b5 fix links in german locale 2022-04-04 20:34:01 +02:00
vabene1111
5bd9a15e4b small fixes 2022-04-04 20:11:22 +02:00
vabene1111
3cedab45ee fixed copy recipe nutrition link 2022-04-04 19:45:37 +02:00
vabene1111
56f3fe2d12 fixed deprecated model attribute on exporters 2022-04-04 19:27:14 +02:00
vabene1111
a2954554b5 fixed description length limit 2022-04-04 19:26:47 +02:00
vabene1111
528ada7d32 Merge branch 'develop' into feature/importer_to_vue
# Conflicts:
#	vue/package.json
2022-04-04 19:16:20 +02:00
vabene1111
b7e6e7b1b0 fixed s3 check 2022-04-04 19:15:11 +02:00
vabene1111
e17da08a74 Merge pull request #1679 from TandoorRecipes/dependabot/pip/jinja2-3.1.1
Bump jinja2 from 3.0.3 to 3.1.1
2022-04-04 19:07:34 +02:00
vabene1111
32cedf1078 Merge pull request #1680 from TandoorRecipes/dependabot/pip/boto3-1.21.31
Bump boto3 from 1.21.28 to 1.21.31
2022-04-04 19:07:29 +02:00
vabene1111
60bb3fd4aa Merge pull request #1633 from smilerz/recipe_as_food
allow marking recipe as food
2022-04-04 19:06:10 +02:00
dependabot[bot]
f421990ae0 Bump jinja2 from 3.0.3 to 3.1.1
Bumps [jinja2](https://github.com/pallets/jinja) from 3.0.3 to 3.1.1.
- [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.0.3...3.1.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-04 17:05:40 +00:00
vabene1111
f9333d2b82 Merge pull request #1681 from TandoorRecipes/dependabot/pip/recipe-scrapers-13.25.0
Bump recipe-scrapers from 13.19.0 to 13.25.0
2022-04-04 19:04:58 +02:00
vabene1111
dfa5475ecb Merge pull request #1690 from kettenbach-it/develop
Get image from S3-storage if configured
2022-04-04 19:02:35 +02:00
Volker Kettenbach
b6e5425bd3 Get image from S3-Storage if configured 2022-04-02 11:35:35 +02:00
dependabot[bot]
1b7347f1d9 Bump recipe-scrapers from 13.19.0 to 13.25.0
Bumps [recipe-scrapers](https://github.com/hhursev/recipe-scrapers) from 13.19.0 to 13.25.0.
- [Release notes](https://github.com/hhursev/recipe-scrapers/releases)
- [Commits](https://github.com/hhursev/recipe-scrapers/compare/13.19.0...13.25.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>
2022-04-01 00:04:59 +00:00
dependabot[bot]
2ef23d2cb3 Bump boto3 from 1.21.28 to 1.21.31
Bumps [boto3](https://github.com/boto/boto3) from 1.21.28 to 1.21.31.
- [Release notes](https://github.com/boto/boto3/releases)
- [Changelog](https://github.com/boto/boto3/blob/develop/CHANGELOG.rst)
- [Commits](https://github.com/boto/boto3/compare/1.21.28...1.21.31)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-01 00:04:51 +00:00
Lucas Declercq
bba81f6594 Translated using Weblate (French)
Currently translated at 87.3% (330 of 378 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/fr/
2022-03-31 06:01:57 +00:00
Marcus Alsterfjord
3a4f08f2f7 Translated using Weblate (Swedish)
Currently translated at 57.6% (218 of 378 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/sv/
2022-03-31 06:01:56 +00:00
Marcus Alsterfjord
f8ad465113 Translated using Weblate (Swedish)
Currently translated at 55.0% (208 of 378 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/sv/
2022-03-29 20:36:24 +00:00
Marcus Alsterfjord
6df993ce29 Translated using Weblate (Swedish)
Currently translated at 54.7% (203 of 371 strings)

Translation: Tandoor/Recipes Backend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-backend/sv/
2022-03-29 20:36:24 +00:00
Adrian M
6009eae42d Translated using Weblate (Hungarian)
Currently translated at 100.0% (568 of 568 strings)

Translation: Tandoor/Recipes Backend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-backend/hu/
2022-03-29 20:36:24 +00:00
vabene1111
7bed9963ff fixed vue cli pwa version and admin comment search 2022-03-28 22:56:45 +02:00
vabene1111
a0610ac05f Merge pull request #1676 from TandoorRecipes/dependabot/npm_and_yarn/vue/vue/cli-plugin-eslint-5.0.4
Bump @vue/cli-plugin-eslint from 4.5.15 to 5.0.4 in /vue
2022-03-28 22:15:58 +02:00
dependabot[bot]
afd063a2b9 Bump @vue/cli-plugin-eslint from 4.5.15 to 5.0.4 in /vue
Bumps [@vue/cli-plugin-eslint](https://github.com/vuejs/vue-cli/tree/HEAD/packages/@vue/cli-plugin-eslint) from 4.5.15 to 5.0.4.
- [Release notes](https://github.com/vuejs/vue-cli/releases)
- [Changelog](https://github.com/vuejs/vue-cli/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/vuejs/vue-cli/commits/v5.0.4/packages/@vue/cli-plugin-eslint)

---
updated-dependencies:
- dependency-name: "@vue/cli-plugin-eslint"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-28 20:01:08 +00:00
vabene1111
6b92dcbb2a Merge pull request #1606 from TandoorRecipes/dependabot/npm_and_yarn/vue/workbox-routing-6.5.0
Bump workbox-routing from 6.4.2 to 6.5.0 in /vue
2022-03-28 21:59:22 +02:00
vabene1111
12af99f546 Merge pull request #1668 from TandoorRecipes/dependabot/pip/cryptography-36.0.2
Bump cryptography from 36.0.1 to 36.0.2
2022-03-28 21:59:08 +02:00
vabene1111
68501d646d Merge pull request #1675 from TandoorRecipes/dependabot/npm_and_yarn/vue/axios-0.26.1
Bump axios from 0.24.0 to 0.26.1 in /vue
2022-03-28 21:58:52 +02:00
vabene1111
d215d236f0 Merge pull request #1669 from TandoorRecipes/dependabot/pip/boto3-1.21.28
Bump boto3 from 1.20.47 to 1.21.28
2022-03-28 21:58:41 +02:00
dependabot[bot]
459cf79ef3 Bump axios from 0.24.0 to 0.26.1 in /vue
Bumps [axios](https://github.com/axios/axios) from 0.24.0 to 0.26.1.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/master/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v0.24.0...v0.26.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-28 19:58:40 +00:00
dependabot[bot]
1d357eca4e Bump cryptography from 36.0.1 to 36.0.2
Bumps [cryptography](https://github.com/pyca/cryptography) from 36.0.1 to 36.0.2.
- [Release notes](https://github.com/pyca/cryptography/releases)
- [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pyca/cryptography/compare/36.0.1...36.0.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-28 19:58:38 +00:00
vabene1111
ca8a7c3bc9 Merge pull request #1626 from TandoorRecipes/dependabot/pip/whitenoise-6.0.0
Bump whitenoise from 5.3.0 to 6.0.0
2022-03-28 21:58:30 +02:00
vabene1111
3b936eca3f Merge pull request #1674 from TandoorRecipes/dependabot/pip/python-dotenv-0.20.0
Bump python-dotenv from 0.19.2 to 0.20.0
2022-03-28 21:58:18 +02:00
vabene1111
2f06e9bc1c Merge pull request #1673 from TandoorRecipes/dependabot/pip/django-autocomplete-light-3.9.4
Bump django-autocomplete-light from 3.8.2 to 3.9.4
2022-03-28 21:57:25 +02:00
dependabot[bot]
e25c0705c6 Bump python-dotenv from 0.19.2 to 0.20.0
Bumps [python-dotenv](https://github.com/theskumar/python-dotenv) from 0.19.2 to 0.20.0.
- [Release notes](https://github.com/theskumar/python-dotenv/releases)
- [Changelog](https://github.com/theskumar/python-dotenv/blob/master/CHANGELOG.md)
- [Commits](https://github.com/theskumar/python-dotenv/compare/v0.19.2...v0.20.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-28 19:57:19 +00:00
vabene1111
d4e9526c75 Merge pull request #1670 from TandoorRecipes/dependabot/npm_and_yarn/vue/minimist-1.2.6
Bump minimist from 1.2.5 to 1.2.6 in /vue
2022-03-28 21:56:52 +02:00
dependabot[bot]
2e2e81638b Bump django-autocomplete-light from 3.8.2 to 3.9.4
Bumps [django-autocomplete-light](https://github.com/yourlabs/django-autocomplete-light) from 3.8.2 to 3.9.4.
- [Release notes](https://github.com/yourlabs/django-autocomplete-light/releases)
- [Changelog](https://github.com/yourlabs/django-autocomplete-light/blob/master/CHANGELOG)
- [Commits](https://github.com/yourlabs/django-autocomplete-light/compare/3.8.2...3.9.4)

---
updated-dependencies:
- dependency-name: django-autocomplete-light
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-28 19:56:46 +00:00
vabene1111
baf5c9700f Merge pull request #1671 from TandoorRecipes/dependabot/pip/django-allauth-0.50.0
Bump django-allauth from 0.47.0 to 0.50.0
2022-03-28 21:56:39 +02:00
dependabot[bot]
dff7daefc7 Bump django-allauth from 0.47.0 to 0.50.0
Bumps [django-allauth](https://github.com/pennersr/django-allauth) from 0.47.0 to 0.50.0.
- [Release notes](https://github.com/pennersr/django-allauth/releases)
- [Changelog](https://github.com/pennersr/django-allauth/blob/master/ChangeLog.rst)
- [Commits](https://github.com/pennersr/django-allauth/compare/0.47.0...0.50.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-28 19:56:33 +00:00
vabene1111
7e27d704ca Merge pull request #1672 from TandoorRecipes/dependabot/pip/pytest-7.1.1
Bump pytest from 7.0.1 to 7.1.1
2022-03-28 21:56:27 +02:00
vabene1111
9722f22837 Merge pull request #1604 from TandoorRecipes/dependabot/npm_and_yarn/vue/vue/cli-plugin-pwa-5.0.1
Bump @vue/cli-plugin-pwa from 4.5.15 to 5.0.1 in /vue
2022-03-28 21:56:09 +02:00
dependabot[bot]
707a12f8c1 Bump pytest from 7.0.1 to 7.1.1
Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.0.1 to 7.1.1.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/7.0.1...7.1.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-28 19:55:38 +00:00
vabene1111
b9b8864631 Merge pull request #1603 from TandoorRecipes/dependabot/npm_and_yarn/vue/popperjs/core-2.11.2
Bump @popperjs/core from 2.11.0 to 2.11.2 in /vue
2022-03-28 21:55:37 +02:00
vabene1111
31bdc0589e Merge pull request #1602 from TandoorRecipes/dependabot/pip/lxml-4.8.0
Bump lxml from 4.7.1 to 4.8.0
2022-03-28 21:55:26 +02:00
dependabot[bot]
cb29caf88c Bump whitenoise from 5.3.0 to 6.0.0
Bumps [whitenoise](https://github.com/evansd/whitenoise) from 5.3.0 to 6.0.0.
- [Release notes](https://github.com/evansd/whitenoise/releases)
- [Changelog](https://github.com/evansd/whitenoise/blob/master/docs/changelog.rst)
- [Commits](https://github.com/evansd/whitenoise/compare/v5.3.0...6.0.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-28 19:55:05 +00:00
dependabot[bot]
dd044eba36 Bump minimist from 1.2.5 to 1.2.6 in /vue
Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-28 19:54:50 +00:00
dependabot[bot]
b8518884b0 Bump boto3 from 1.20.47 to 1.21.28
Bumps [boto3](https://github.com/boto/boto3) from 1.20.47 to 1.21.28.
- [Release notes](https://github.com/boto/boto3/releases)
- [Changelog](https://github.com/boto/boto3/blob/develop/CHANGELOG.rst)
- [Commits](https://github.com/boto/boto3/compare/1.20.47...1.21.28)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-28 19:54:47 +00:00
vabene1111
ed20a54137 Merge pull request #1601 from TandoorRecipes/dependabot/pip/django-allauth-0.49.0
Bump django-allauth from 0.47.0 to 0.49.0
2022-03-28 21:54:30 +02:00
vabene1111
7781bf1444 Merge pull request #1598 from TandoorRecipes/dependabot/pip/pytest-7.0.1
Bump pytest from 6.2.5 to 7.0.1
2022-03-28 21:54:16 +02:00
vabene1111
14db4179b9 Merge pull request #1660 from MaxJa4/patch-1
Add POSTGRES_USER to psql health check during boot
2022-03-28 21:53:27 +02:00
Adrian M
37eab3ece2 Translated using Weblate (Hungarian)
Currently translated at 57.3% (326 of 568 strings)

Translation: Tandoor/Recipes Backend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-backend/hu/
2022-03-28 01:56:10 +00:00
Adrian M
768b483351 Translated using Weblate (Hungarian)
Currently translated at 12.1% (69 of 568 strings)

Translation: Tandoor/Recipes Backend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-backend/hu/
2022-03-27 18:00:28 +00:00
MaxJa4
59d277da3d Add POSTGRES_USER to psql health check during boot
Add POSTGRES_USER to psql health check during boot to support external psql instances better.

Fixes #1656
2022-03-20 00:08:41 +01:00
Stefan Werner
f68fd0fa94 Translated using Weblate (Finnish)
Currently translated at 56.3% (213 of 378 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/fi/
2022-03-18 16:31:49 +00:00
Stefan Werner
dd1fcc21e0 Translated using Weblate (Finnish)
Currently translated at 3.2% (16 of 493 strings)

Translation: Tandoor/Recipes Backend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-backend/fi/
2022-03-18 16:31:49 +00:00
vabene1111
f445722140 Merge pull request #1653 from bradpoulton/develop
Fixes the formatting
2022-03-17 20:46:41 +01:00
brad
a3def6bf4c Fixes the formatting 2022-03-16 22:00:42 -06:00
Adrian M
cbd2ac2032 Translated using Weblate (Hungarian)
Currently translated at 5.6% (32 of 568 strings)

Translation: Tandoor/Recipes Backend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-backend/hu/
2022-03-16 22:31:47 +00:00
vabene1111
1d3d4e78f5 Merge branch 'develop' 2022-03-16 14:27:11 +01:00
vabene1111
e901c6708c Merge branch 'develop' into feature/importer_to_vue 2022-03-15 13:02:10 +01:00
vabene1111
c5863a5309 Merge branch 'develop' 2022-03-15 13:01:59 +01:00
vabene1111
7426bb4e76 auto import multiple urls 2022-03-10 17:35:11 +01:00
vabene1111
92b536b32c check login remember by default 2022-03-10 16:10:33 +01:00
vabene1111
5627161c5e Merge branch 'develop' into feature/importer_to_vue 2022-03-10 15:27:11 +01:00
smilerz
486d197854 allow marking recipe as food 2022-03-06 23:12:59 -06:00
vabene1111
22ca482458 super very basics of manual mapping page working 2022-03-05 16:02:42 +01:00
vabene1111
2565ab30a4 lots of improvements and bookmarklet import working again 2022-03-05 15:16:58 +01:00
vabene1111
1caabef56a step functions 2022-03-04 16:54:59 +01:00
vabene1111
edde8c8b8f Merge branch 'develop' 2022-03-04 15:54:16 +01:00
vabene1111
6d8fe3c162 wip 2022-03-04 15:54:11 +01:00
vabene1111
bdccdf0893 Merge branch 'develop' into feature/importer_to_vue
# Conflicts:
#	cookbook/helper/recipe_url_import.py
2022-03-04 14:33:59 +01:00
dependabot[bot]
f0927bf065 Bump django-allauth from 0.47.0 to 0.49.0
Bumps [django-allauth](https://github.com/pennersr/django-allauth) from 0.47.0 to 0.49.0.
- [Release notes](https://github.com/pennersr/django-allauth/releases)
- [Changelog](https://github.com/pennersr/django-allauth/blob/master/ChangeLog.rst)
- [Commits](https://github.com/pennersr/django-allauth/compare/0.47.0...0.49.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-04 13:30:25 +00:00
dependabot[bot]
ed1fb9a95e Bump pytest from 6.2.5 to 7.0.1
Bumps [pytest](https://github.com/pytest-dev/pytest) from 6.2.5 to 7.0.1.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/6.2.5...7.0.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-04 13:30:07 +00:00
vabene1111
030d977a8c Merge branch 'develop' 2022-03-02 13:11:57 +01:00
dependabot[bot]
5f25df7d19 Bump workbox-routing from 6.4.2 to 6.5.0 in /vue
Bumps [workbox-routing](https://github.com/googlechrome/workbox) from 6.4.2 to 6.5.0.
- [Release notes](https://github.com/googlechrome/workbox/releases)
- [Commits](https://github.com/googlechrome/workbox/compare/v6.4.2...v6.5.0)

---
updated-dependencies:
- dependency-name: workbox-routing
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-01 00:12:01 +00:00
dependabot[bot]
e55f78c767 Bump @vue/cli-plugin-pwa from 4.5.15 to 5.0.1 in /vue
Bumps [@vue/cli-plugin-pwa](https://github.com/vuejs/vue-cli/tree/HEAD/packages/@vue/cli-plugin-pwa) from 4.5.15 to 5.0.1.
- [Release notes](https://github.com/vuejs/vue-cli/releases)
- [Changelog](https://github.com/vuejs/vue-cli/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/vuejs/vue-cli/commits/v5.0.1/packages/@vue/cli-plugin-pwa)

---
updated-dependencies:
- dependency-name: "@vue/cli-plugin-pwa"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-01 00:10:36 +00:00
dependabot[bot]
6d257d2455 Bump @popperjs/core from 2.11.0 to 2.11.2 in /vue
Bumps [@popperjs/core](https://github.com/popperjs/popper-core) from 2.11.0 to 2.11.2.
- [Release notes](https://github.com/popperjs/popper-core/releases)
- [Commits](https://github.com/popperjs/popper-core/compare/v2.11.0...v2.11.2)

---
updated-dependencies:
- dependency-name: "@popperjs/core"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-01 00:09:44 +00:00
dependabot[bot]
693a5214ef Bump lxml from 4.7.1 to 4.8.0
Bumps [lxml](https://github.com/lxml/lxml) from 4.7.1 to 4.8.0.
- [Release notes](https://github.com/lxml/lxml/releases)
- [Changelog](https://github.com/lxml/lxml/blob/master/CHANGES.txt)
- [Commits](https://github.com/lxml/lxml/compare/lxml-4.7.1...lxml-4.8.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-01 00:03:39 +00:00
vabene1111
52c16ab7dd all types bascially working (lacking bookmark) 2022-02-22 17:00:30 +01:00
vabene1111
0d98c77301 some small ui stuff 2022-02-21 18:29:23 +01:00
vabene1111
e04d672750 import with image working 2022-02-21 15:59:30 +01:00
vabene1111
c06c511dc9 changed unit default in ingredient parser to none
because empty name units are not accepted by unit serializer but null values can be handled by the ingredient serializer (as a unit can be null)
2022-02-21 15:35:36 +01:00
nough
0ae1ecd867 Update backup.md
Added manual backup method first draft
2022-02-20 00:59:56 +00:00
vabene1111
c8fc67fa2b changed source import to match field structure of recipe model
first imports working
2022-02-19 17:54:00 +01:00
vabene1111
89348f69f1 basics of new import page 2022-02-19 16:55:17 +01:00
vabene1111
55b035eaaa first boilerplate for new import view 2022-02-19 09:34:42 +01:00
325 changed files with 52753 additions and 40986 deletions

View File

@@ -68,6 +68,10 @@ SHOPPING_MIN_AUTOSYNC_INTERVAL=5
# when unset: 1 (true) - this is temporary until an appropriate amount of time has passed for everyone to migrate
GUNICORN_MEDIA=0
# GUNICORN SERVER RELATED SETTINGS (see https://docs.gunicorn.org/en/stable/design.html#how-many-workers for recommended settings)
# GUNICORN_WORKERS=1
# GUNICORN_THREADS=1
# S3 Media settings: store mediafiles in s3 or any compatible storage backend (e.g. minio)
# as long as S3_ACCESS_KEY is not set S3 features are disabled
# S3_ACCESS_KEY=
@@ -77,6 +81,7 @@ GUNICORN_MEDIA=0
# S3_QUERYSTRING_AUTH=1 # default true, set to 0 to serve media from a public bucket without signed urls
# S3_QUERYSTRING_EXPIRE=3600 # number of seconds querystring are valid for
# S3_ENDPOINT_URL= # when using a custom endpoint like minio
# S3_CUSTOM_DOMAIN= # when using a CDN/proxy to S3 (see https://github.com/TandoorRecipes/recipes/issues/1943)
# Email Settings, see https://docs.djangoproject.com/en/3.2/ref/settings/#email-host
# Required for email confirmation and password reset (automatically activates if host is set)
@@ -86,8 +91,10 @@ GUNICORN_MEDIA=0
# EMAIL_HOST_PASSWORD=
# EMAIL_USE_TLS=0
# EMAIL_USE_SSL=0
# DEFAULT_FROM_EMAIL= # email sender address (default 'webmaster@localhost')
# ACCOUNT_EMAIL_SUBJECT_PREFIX= # prefix used for account related emails (default "[Tandoor Recipes] ")
# email sender address (default 'webmaster@localhost')
# DEFAULT_FROM_EMAIL=
# prefix used for account related emails (default "[Tandoor Recipes] ")
# ACCOUNT_EMAIL_SUBJECT_PREFIX=
# allow authentication via reverse proxy (e.g. authelia), leave off if you dont know what you are doing
# see docs for more information https://vabene1111.github.io/recipes/features/authentication/

View File

@@ -29,6 +29,7 @@ jobs:
run: yarn build
- name: Install Django dependencies
run: |
sudo apt-get -y update
sudo apt-get install -y libsasl2-dev python-dev libldap2-dev libssl-dev
python -m pip install --upgrade pip
pip install -r requirements.txt

View File

@@ -0,0 +1,48 @@
name: publish beta raspi image docker
on:
push:
branches:
- 'beta'
jobs:
build:
if: github.repository_owner == 'TandoorRecipes'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
# Update Version number
- name: Update version file
uses: DamianReeves/write-file-action@v1.0
with:
path: recipes/version.py
contents: |
VERSION_NUMBER = 'beta'
BUILD_REF = '${{ github.sha }}'
write-mode: overwrite
# Build Vue frontend
- uses: actions/setup-node@v2
with:
node-version: '14'
- name: Install dependencies
working-directory: ./vue
run: yarn install
- name: Build dependencies
working-directory: ./vue
run: yarn build
# Build container
- name: Build and publish image
uses: ilteoood/docker_buildx@master
with:
publish: true
imageName: vabene1111/recipes
tag: beta-raspi
dockerFile: Dockerfile-raspi
platform: linux/arm/v7
dockerUser: ${{ secrets.DOCKER_USERNAME }}
dockerPassword: ${{ secrets.DOCKER_PASSWORD }}
# Send discord notification
- name: Discord notification
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_BETA_WEBHOOK }}
uses: Ilshidur/action-discord@0.3.2
with:
args: '🚀 The BETA Image has been updated! 🥳'

View File

@@ -35,6 +35,7 @@ jobs:
publish: true
imageName: vabene1111/recipes
tag: beta
platform: linux/amd64,linux/arm64
dockerUser: ${{ secrets.DOCKER_USERNAME }}
dockerPassword: ${{ secrets.DOCKER_PASSWORD }}
# Send discord notification

View File

@@ -0,0 +1,45 @@
name: publish latest raspi image docker
on:
push:
tags:
- '*'
jobs:
build:
if: github.repository_owner == 'TandoorRecipes'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Get version number
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}-raspi
# Update Version number
- name: Update version file
uses: DamianReeves/write-file-action@v1.0
with:
path: recipes/version.py
contents: |
VERSION_NUMBER = '${{ steps.get_version.outputs.VERSION }}-raspi'
BUILD_REF = '${{ github.sha }}'
write-mode: overwrite
# Build Vue frontend
- uses: actions/setup-node@v2
with:
node-version: '14'
- name: Install dependencies
working-directory: ./vue
run: yarn install
- name: Build dependencies
working-directory: ./vue
run: yarn build
# Build container
- name: Build and publish image
uses: ilteoood/docker_buildx@master
with:
publish: true
imageName: vabene1111/recipes
dockerFile: Dockerfile-raspi
platform: linux/arm/v7
tag: latest-raspi
dockerUser: ${{ secrets.DOCKER_USERNAME }}
dockerPassword: ${{ secrets.DOCKER_PASSWORD }}

View File

@@ -38,6 +38,7 @@ jobs:
with:
publish: true
imageName: vabene1111/recipes
platform: linux/amd64,linux/arm64
tag: latest
dockerUser: ${{ secrets.DOCKER_USERNAME }}
dockerPassword: ${{ secrets.DOCKER_PASSWORD }}

View File

@@ -0,0 +1,47 @@
name: publish tagged raspi release docker
on:
release:
types: [published]
jobs:
build:
if: github.repository_owner == 'TandoorRecipes'
runs-on: ubuntu-latest
name: Build image job
steps:
- name: Checkout master
uses: actions/checkout@master
- name: Get version number
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
# Update Version number
- name: Update version file
uses: DamianReeves/write-file-action@v1.0
with:
path: recipes/version.py
contents: |
VERSION_NUMBER = '${{ steps.get_version.outputs.VERSION }}'
BUILD_REF = '${{ github.sha }}'
write-mode: overwrite
# Build Vue frontend
- uses: actions/setup-node@v2
with:
node-version: '14'
- name: Install dependencies
working-directory: ./vue
run: yarn install
- name: Build dependencies
working-directory: ./vue
run: yarn build
# Build container
- name: Build and publish image
uses: ilteoood/docker_buildx@master
with:
publish: true
imageName: vabene1111/recipes
dockerFile: Dockerfile-raspi
platform: linux/arm/v7
tag: ${{ steps.get_version.outputs.VERSION }}-raspi
dockerUser: ${{ secrets.DOCKER_USERNAME }}
dockerPassword: ${{ secrets.DOCKER_PASSWORD }}

View File

@@ -40,6 +40,7 @@ jobs:
with:
publish: true
imageName: vabene1111/recipes
platform: linux/amd64,linux/arm64
tag: ${{ steps.get_version.outputs.VERSION }}
dockerUser: ${{ secrets.DOCKER_USERNAME }}
dockerPassword: ${{ secrets.DOCKER_PASSWORD }}

View File

@@ -3,7 +3,6 @@ on:
push:
branches:
- master
- develop
jobs:
deploy:

View File

@@ -6,6 +6,7 @@
<w>csrftoken</w>
<w>gunicorn</w>
<w>ical</w>
<w>invitelink</w>
<w>mealie</w>
<w>pepperplate</w>
<w>safron</w>

View File

@@ -1,7 +1,10 @@
# Contributers
Many thanks to everyone who contributed to this project! If you add something or help out feel free to add yourself
to this list.
## Code/Features
Please have a look at the [list of pull requests](https://github.com/vabene1111/recipes/pulls) for
a complete list of contributions.
Below are some of the larger contributions made yet.
@@ -20,46 +23,61 @@ Below are some of the larger contributions made yet.
## Translations
### Catalan
### Catalan
[Rubenix](https://www.transifex.com/user/profile/rubenix/)
### Dutch
[D0T1X](https://www.transifex.com/user/profile/D0T1X/)
[ikbenfrank](https://www.transifex.com/user/profile/ikbenfrank/)
[kampsj](https://www.transifex.com/user/profile/kampsj/)
[D0T1X](https://www.transifex.com/user/profile/D0T1X/)
[ikbenfrank](https://www.transifex.com/user/profile/ikbenfrank/)
[kampsj](https://www.transifex.com/user/profile/kampsj/)
### French
[jt117](https://www.transifex.com/user/profile/jt117/)
[nerdinator](https://www.transifex.com/user/profile/nerdinator/)
[agaume](https://www.transifex.com/user/profile/agaume/)
[jt117](https://www.transifex.com/user/profile/jt117/)
[nerdinator](https://www.transifex.com/user/profile/nerdinator/)
[agaume](https://www.transifex.com/user/profile/agaume/)
### German
[eTaurus](https://www.transifex.com/user/profile/eTaurus/)
[l0c4lh057](https://www.transifex.com/user/profile/l0c4lh057/)
[hyperbit00]
[hyperbit00](https://github.com/hyperbit00)
### Hungarian
[igazka](https://www.transifex.com/user/profile/igazka/)
### Italian
[SK3LA](https://www.transifex.com/user/profile/SK3LA/)
[auanasgheps](https://www.transifex.com/user/profile/auanasgheps/)
[SK3LA](https://www.transifex.com/user/profile/SK3LA/)
[auanasgheps](https://www.transifex.com/user/profile/auanasgheps/)
### Latvian
[melkypie](https://github.com/melkypie)
### Portuguese
[hds](https://www.transifex.com/user/profile/hds/)
[mlopezifu](https://www.transifex.com/user/profile/mlopezifu/)
[stormsz](https://www.transifex.com/user/profile/stormsz/)
[hds](https://www.transifex.com/user/profile/hds/)
[mlopezifu](https://www.transifex.com/user/profile/mlopezifu/)
[stormsz](https://www.transifex.com/user/profile/stormsz/)
### Russian
[amillerr](https://github.com/amillerr)
### Spanish
[albertocp](https://www.transifex.com/user/profile/albertocp/)
[alfa5](https://www.transifex.com/user/profile/alfa5/)
[mlopezifu](https://www.transifex.com/user/profile/mlopezifu/)
[sergio.laya](https://www.transifex.com/user/profile/sergio.laya/)
[albertocp](https://www.transifex.com/user/profile/albertocp/)
[alfa5](https://www.transifex.com/user/profile/alfa5/)
[mlopezifu](https://www.transifex.com/user/profile/mlopezifu/)
[sergio.laya](https://www.transifex.com/user/profile/sergio.laya/)
### Swedish
[makanz](https://github.com/makanz)
### Turkish

View File

@@ -15,7 +15,7 @@ WORKDIR /opt/recipes
COPY requirements.txt ./
RUN apk add --no-cache --virtual .build-deps gcc musl-dev postgresql-dev zlib-dev jpeg-dev libwebp-dev libressl-dev libffi-dev cargo openssl-dev openldap-dev python3-dev && \
RUN apk add --no-cache --virtual .build-deps gcc musl-dev postgresql-dev zlib-dev jpeg-dev libwebp-dev openssl-dev libffi-dev cargo openldap-dev python3-dev git && \
echo -n "INPUT ( libldap.so )" > /usr/lib/libldap_r.so && \
python -m venv venv && \
/opt/recipes/venv/bin/python -m pip install --upgrade pip && \

33
Dockerfile-raspi Normal file
View File

@@ -0,0 +1,33 @@
# builds of cryptography for raspberry pi (or better arm v7) fail for some
FROM python:3.9-alpine3.15
#Install all dependencies.
RUN apk add --no-cache postgresql-libs postgresql-client gettext zlib libjpeg libwebp libxml2-dev libxslt-dev py-cryptography openldap gcompat
#Print all logs without buffering it.
ENV PYTHONUNBUFFERED 1
#This port will be used by gunicorn.
EXPOSE 8080
#Create app dir and install requirements.
RUN mkdir /opt/recipes
WORKDIR /opt/recipes
COPY requirements.txt ./
RUN \
if [ `apk --print-arch` = "armv7" ]; then \
printf "[global]\nextra-index-url=https://www.piwheels.org/simple\n" > /etc/pip.conf ; \
fi
RUN apk add --no-cache --virtual .build-deps gcc musl-dev zlib-dev jpeg-dev libwebp-dev python3-dev git && \
echo -n "INPUT ( libldap.so )" > /usr/lib/libldap_r.so && \
python -m venv venv && \
/opt/recipes/venv/bin/python -m pip install --upgrade pip && \
venv/bin/pip install wheel==0.37.1 && \
venv/bin/pip install -r requirements.txt --no-cache-dir --no-binary=Pillow && \
apk --purge del .build-deps
#Copy project and execute it.
COPY . ./
RUN chmod +x boot.sh
ENTRYPOINT ["/opt/recipes/boot.sh"]

View File

@@ -61,6 +61,15 @@ a public page.
Documentation can be found [here](https://docs.tandoor.dev/).
## Support our work
Tandoor is developed by volunteers in their free time just because its fun. That said earning
some money with the project allows us to spend more time on it and thus make improvements we otherwise couldn't.
Because of that there are several ways you can support us
- **GitHub Sponsors** You can sponsor contributors of this project on GitHub: [vabene1111](https://github.com/sponsors/vabene1111)
- **Host at Hetzner** We have been very happy customers of Hetzner for multiple years for all of our projects. If you want to get into self-hosting or are tired of the expensive big providers, their cloud servers are a great place to get started. When you sign up via our [referral link](https://hetzner.cloud/?ref=ISdlrLmr9kGj) you will get 20€ worth of cloud credits and we get a small kickback too.
- **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
You can help out with the ongoing development by looking for potential bugs in our code base, or by contributing new features. We are always welcoming new pull requests containing bug fixes, refactors and new features. We have a list of tasks and bugs on our issue tracker on Github. Please comment on issues if you want to contribute with, to avoid duplicating effort.

View File

@@ -2,6 +2,8 @@
source venv/bin/activate
TANDOOR_PORT="${TANDOOR_PORT:-8080}"
GUNICORN_WORKERS="${GUNICORN_WORKERS:-3}"
GUNICORN_THREADS="${GUNICORN_THREADS:-2}"
NGINX_CONF_FILE=/opt/recipes/nginx/conf.d/Recipes.conf
display_warning() {
@@ -34,7 +36,7 @@ if [ "${DB_ENGINE}" != 'django.db.backends.sqlite3' ]; then
display_warning "The environment variable 'POSTGRES_PASSWORD' is not set but REQUIRED for running Tandoor!"
fi
while pg_isready --host=${POSTGRES_HOST} --port=${POSTGRES_PORT} -q; status=$?; attempt=$((attempt+1)); [ $status -ne 0 ] && [ $attempt -le $max_attempts ]; do
while pg_isready --host=${POSTGRES_HOST} --port=${POSTGRES_PORT} --user=${POSTGRES_USER} -q; status=$?; attempt=$((attempt+1)); [ $status -ne 0 ] && [ $attempt -le $max_attempts ]; do
sleep 5
done
fi
@@ -63,4 +65,4 @@ echo "Done"
chmod -R 755 /opt/recipes/mediafiles
exec gunicorn -b :$TANDOOR_PORT --access-logfile - --error-logfile - --log-level INFO recipes.wsgi
exec gunicorn -b :$TANDOOR_PORT --workers $GUNICORN_WORKERS --threads $GUNICORN_THREADS --access-logfile - --error-logfile - --log-level INFO recipes.wsgi

View File

@@ -15,7 +15,7 @@ from .models import (BookmarkletImport, Comment, CookLog, Food, FoodInheritField
Recipe, RecipeBook, RecipeBookEntry, RecipeImport, SearchPreference, ShareLink,
ShoppingList, ShoppingListEntry, ShoppingListRecipe, Space, Step, Storage,
Supermarket, SupermarketCategory, SupermarketCategoryRelation, Sync, SyncLog,
TelegramBot, Unit, UserFile, UserPreference, ViewLog, Automation)
TelegramBot, Unit, UserFile, UserPreference, ViewLog, Automation, UserSpace)
class CustomUserAdmin(UserAdmin):
@@ -32,41 +32,7 @@ admin.site.unregister(Group)
@admin.action(description='Delete all data from a space')
def delete_space_action(modeladmin, request, queryset):
for space in queryset:
CookLog.objects.filter(space=space).delete()
ViewLog.objects.filter(space=space).delete()
ImportLog.objects.filter(space=space).delete()
BookmarkletImport.objects.filter(space=space).delete()
Comment.objects.filter(recipe__space=space).delete()
Keyword.objects.filter(space=space).delete()
Ingredient.objects.filter(space=space).delete()
Food.objects.filter(space=space).delete()
Unit.objects.filter(space=space).delete()
Step.objects.filter(space=space).delete()
NutritionInformation.objects.filter(space=space).delete()
RecipeBookEntry.objects.filter(book__space=space).delete()
RecipeBook.objects.filter(space=space).delete()
MealType.objects.filter(space=space).delete()
MealPlan.objects.filter(space=space).delete()
ShareLink.objects.filter(space=space).delete()
Recipe.objects.filter(space=space).delete()
RecipeImport.objects.filter(space=space).delete()
SyncLog.objects.filter(sync__space=space).delete()
Sync.objects.filter(space=space).delete()
Storage.objects.filter(space=space).delete()
ShoppingListEntry.objects.filter(shoppinglist__space=space).delete()
ShoppingListRecipe.objects.filter(shoppinglist__space=space).delete()
ShoppingList.objects.filter(space=space).delete()
SupermarketCategoryRelation.objects.filter(supermarket__space=space).delete()
SupermarketCategory.objects.filter(space=space).delete()
Supermarket.objects.filter(space=space).delete()
InviteLink.objects.filter(space=space).delete()
UserFile.objects.filter(space=space).delete()
Automation.objects.filter(space=space).delete()
space.save()
class SpaceAdmin(admin.ModelAdmin):
@@ -80,15 +46,23 @@ class SpaceAdmin(admin.ModelAdmin):
admin.site.register(Space, SpaceAdmin)
class UserSpaceAdmin(admin.ModelAdmin):
list_display = ('user', 'space',)
search_fields = ('user__username', 'space__name',)
admin.site.register(UserSpace, UserSpaceAdmin)
class UserPreferenceAdmin(admin.ModelAdmin):
list_display = ('name', 'space', 'theme', 'nav_color', 'default_page', 'search_style',) # TODO add new fields
search_fields = ('user__username', 'space__name')
list_filter = ('theme', 'nav_color', 'default_page', 'search_style')
list_display = ('name', 'theme', 'nav_color', 'default_page',)
search_fields = ('user__username',)
list_filter = ('theme', 'nav_color', 'default_page',)
date_hierarchy = 'created_at'
@staticmethod
def name(obj):
return obj.user.get_user_name()
return obj.user.get_user_display_name()
admin.site.register(UserPreference, UserPreferenceAdmin)
@@ -101,7 +75,7 @@ class SearchPreferenceAdmin(admin.ModelAdmin):
@staticmethod
def name(obj):
return obj.user.get_user_name()
return obj.user.get_user_display_name()
admin.site.register(SearchPreference, SearchPreferenceAdmin)
@@ -203,7 +177,7 @@ class RecipeAdmin(admin.ModelAdmin):
@staticmethod
def created_by(obj):
return obj.created_by.get_user_name()
return obj.created_by.get_user_display_name()
if settings.DATABASES['default']['ENGINE'] in ['django.db.backends.postgresql_psycopg2', 'django.db.backends.postgresql']:
actions = [rebuild_index]
@@ -237,12 +211,12 @@ admin.site.register(Ingredient, IngredientAdmin)
class CommentAdmin(admin.ModelAdmin):
list_display = ('recipe', 'name', 'created_at')
search_fields = ('text', 'user__username')
search_fields = ('text', 'created_by__username')
date_hierarchy = 'created_at'
@staticmethod
def name(obj):
return obj.created_by.get_user_name()
return obj.created_by.get_user_display_name()
admin.site.register(Comment, CommentAdmin)
@@ -261,7 +235,7 @@ class RecipeBookAdmin(admin.ModelAdmin):
@staticmethod
def user_name(obj):
return obj.created_by.get_user_name()
return obj.created_by.get_user_display_name()
admin.site.register(RecipeBook, RecipeBookAdmin)
@@ -279,7 +253,7 @@ class MealPlanAdmin(admin.ModelAdmin):
@staticmethod
def user(obj):
return obj.created_by.get_user_name()
return obj.created_by.get_user_display_name()
admin.site.register(MealPlan, MealPlanAdmin)

View File

@@ -1,81 +0,0 @@
import django_filters
from django.conf import settings
from django.contrib.postgres.search import TrigramSimilarity
from django.db.models import Q
from django.utils.translation import gettext as _
from django_scopes import scopes_disabled
from cookbook.forms import MultiSelectWidget
from cookbook.models import Food, Keyword, Recipe, ShoppingList
with scopes_disabled():
class RecipeFilter(django_filters.FilterSet):
name = django_filters.CharFilter(method='filter_name')
keywords = django_filters.ModelMultipleChoiceFilter(
queryset=Keyword.objects.none(),
widget=MultiSelectWidget,
method='filter_keywords'
)
foods = django_filters.ModelMultipleChoiceFilter(
queryset=Food.objects.none(),
widget=MultiSelectWidget,
method='filter_foods',
label=_('Ingredients')
)
def __init__(self, data=None, *args, **kwargs):
space = kwargs.pop('space')
super().__init__(data, *args, **kwargs)
self.filters['foods'].queryset = Food.objects.filter(space=space).all()
self.filters['keywords'].queryset = Keyword.objects.filter(space=space).all()
@staticmethod
def filter_keywords(queryset, name, value):
if not name == 'keywords':
return queryset
for x in value:
queryset = queryset.filter(keywords=x)
return queryset
@staticmethod
def filter_foods(queryset, name, value):
if not name == 'foods':
return queryset
for x in value:
queryset = queryset.filter(steps__ingredients__food__name=x).distinct()
return queryset
@staticmethod
def filter_name(queryset, name, value):
if not name == 'name':
return queryset
if settings.DATABASES['default']['ENGINE'] in ['django.db.backends.postgresql_psycopg2',
'django.db.backends.postgresql']:
queryset = queryset.annotate(similarity=TrigramSimilarity('name', value), ).filter(
Q(similarity__gt=0.1) | Q(name__unaccent__icontains=value)).order_by('-similarity')
else:
queryset = queryset.filter(name__icontains=value)
return queryset
class Meta:
model = Recipe
fields = ['name', 'keywords', 'foods', 'internal']
# class FoodFilter(django_filters.FilterSet):
# name = django_filters.CharFilter(lookup_expr='icontains')
# class Meta:
# model = Food
# fields = ['name']
class ShoppingListFilter(django_filters.FilterSet):
def __init__(self, data=None, *args, **kwargs):
if data is not None:
data = data.copy()
data.setdefault("finished", False)
super().__init__(data, *args, **kwargs)
class Meta:
model = ShoppingList
fields = ['finished']

View File

@@ -37,19 +37,15 @@ class UserPreferenceForm(forms.ModelForm):
prefix = 'preference'
def __init__(self, *args, **kwargs):
if x := kwargs.get('instance', None):
space = x.space
else:
space = kwargs.pop('space')
space = kwargs.pop('space')
super().__init__(*args, **kwargs)
self.fields['plan_share'].queryset = User.objects.filter(userpreference__space=space).all()
self.fields['plan_share'].queryset = User.objects.filter(userspace__space=space).all()
class Meta:
model = UserPreference
fields = (
'default_unit', 'use_fractions', 'use_kj', 'theme', 'nav_color',
'sticky_navbar', 'default_page', 'show_recent', 'search_style',
'plan_share', 'ingredient_decimals', 'comments',
'sticky_navbar', 'default_page', 'plan_share', 'ingredient_decimals', 'comments', 'left_handed',
)
labels = {
@@ -60,35 +56,33 @@ class UserPreferenceForm(forms.ModelForm):
'nav_color': _('Navbar color'),
'sticky_navbar': _('Sticky navbar'),
'default_page': _('Default page'),
'show_recent': _('Show recent recipes'),
'search_style': _('Search style'),
'plan_share': _('Plan sharing'),
'ingredient_decimals': _('Ingredient decimal places'),
'shopping_auto_sync': _('Shopping list auto sync period'),
'comments': _('Comments')
'comments': _('Comments'),
'left_handed': _('Left-handed mode')
}
help_texts = {
'nav_color': _('Color of the top navigation bar. Not all colors work with all themes, just try them out!'),
# noqa: E501
'default_unit': _('Default Unit to be used when inserting a new ingredient into a recipe.'), # noqa: E501
'default_unit': _('Default Unit to be used when inserting a new ingredient into a recipe.'),
'use_fractions': _(
'Enables support for fractions in ingredient amounts (e.g. convert decimals to fractions automatically)'),
# noqa: E501
'use_kj': _('Display nutritional energy amounts in joules instead of calories'), # noqa: E501
'use_kj': _('Display nutritional energy amounts in joules instead of calories'),
'plan_share': _('Users with whom newly created meal plans should be shared by default.'),
'shopping_share': _('Users with whom to share shopping lists.'),
# noqa: E501
'show_recent': _('Show recently viewed recipes on search page.'), # noqa: E501
'ingredient_decimals': _('Number of decimals to round ingredients.'), # noqa: E501
'comments': _('If you want to be able to create and see comments underneath recipes.'), # noqa: E501
'ingredient_decimals': _('Number of decimals to round ingredients.'),
'comments': _('If you want to be able to create and see comments underneath recipes.'),
'shopping_auto_sync': _(
'Setting to 0 will disable auto sync. When viewing a shopping list the list is updated every set seconds to sync changes someone else might have made. Useful when shopping with multiple people but might use a little bit ' # noqa: E501
'of mobile data. If lower than instance limit it is reset when saving.' # noqa: E501
'Setting to 0 will disable auto sync. When viewing a shopping list the list is updated every set seconds to sync changes someone else might have made. Useful when shopping with multiple people but might use a little bit '
'of mobile data. If lower than instance limit it is reset when saving.'
),
'sticky_navbar': _('Makes the navbar stick to the top of the page.'), # noqa: E501
'sticky_navbar': _('Makes the navbar stick to the top of the page.'),
'mealplan_autoadd_shopping': _('Automatically add meal plan ingredients to shopping list.'),
'mealplan_autoexclude_onhand': _('Exclude ingredients that are on hand.'),
'left_handed': _('Will optimize the UI for use with your left hand.')
}
widgets = {
@@ -153,11 +147,13 @@ class ImportExportBase(forms.Form):
RECIPESAGE = 'RECIPESAGE'
DOMESTICA = 'DOMESTICA'
MEALMASTER = 'MEALMASTER'
MELARECIPES = 'MELARECIPES'
REZKONV = 'REZKONV'
OPENEATS = 'OPENEATS'
PLANTOEAT = 'PLANTOEAT'
COOKBOOKAPP = 'COOKBOOKAPP'
COPYMETHAT = 'COPYMETHAT'
COOKMATE = 'COOKMATE'
PDF = 'PDF'
type = forms.ChoiceField(choices=(
@@ -165,7 +161,8 @@ class ImportExportBase(forms.Form):
(MEALIE, 'Mealie'), (CHOWDOWN, 'Chowdown'), (SAFFRON, 'Saffron'), (CHEFTAP, 'ChefTap'),
(PEPPERPLATE, 'Pepperplate'), (RECETTETEK, 'RecetteTek'), (RECIPESAGE, 'Recipe Sage'), (DOMESTICA, 'Domestica'),
(MEALMASTER, 'MealMaster'), (REZKONV, 'RezKonv'), (OPENEATS, 'Openeats'), (RECIPEKEEPER, 'Recipe Keeper'),
(PLANTOEAT, 'Plantoeat'), (COOKBOOKAPP, 'CookBookApp'), (COPYMETHAT, 'CopyMeThat'), (PDF, 'PDF'),
(PLANTOEAT, 'Plantoeat'), (COOKBOOKAPP, 'CookBookApp'), (COPYMETHAT, 'CopyMeThat'), (PDF, 'PDF'), (MELARECIPES, 'Melarecipes'),
(COOKMATE, 'Cookmate')
))
@@ -334,9 +331,9 @@ class MealPlanForm(forms.ModelForm):
)
help_texts = {
'shared': _('You can list default users to share recipes with in the settings.'), # noqa: E501
'shared': _('You can list default users to share recipes with in the settings.'),
'note': _('You can use markdown to format this field. See the <a href="/docs/markdown/">docs here</a>')
# noqa: E501
}
widgets = {
@@ -491,8 +488,8 @@ class ShoppingPreferenceForm(forms.ModelForm):
help_texts = {
'shopping_share': _('Users will see all items you add to your shopping list. They must add you to see items on their list.'),
'shopping_auto_sync': _(
'Setting to 0 will disable auto sync. When viewing a shopping list the list is updated every set seconds to sync changes someone else might have made. Useful when shopping with multiple people but might use a little bit ' # noqa: E501
'of mobile data. If lower than instance limit it is reset when saving.' # noqa: E501
'Setting to 0 will disable auto sync. When viewing a shopping list the list is updated every set seconds to sync changes someone else might have made. Useful when shopping with multiple people but might use a little bit '
'of mobile data. If lower than instance limit it is reset when saving.'
),
'mealplan_autoadd_shopping': _('Automatically add meal plan ingredients to shopping list.'),
'mealplan_autoinclude_related': _('When adding a meal plan to the shopping list (manually or automatically), include all related recipes.'),

View File

@@ -14,7 +14,7 @@ class AllAuthCustomAdapter(DefaultAccountAdapter):
def is_open_for_signup(self, request):
"""
Whether to allow sign ups.
Whether to allow sign-ups.
"""
signup_token = False
if 'signup_token' in request.session and InviteLink.objects.filter(valid_until__gte=datetime.datetime.today(), used_by=None, uuid=request.session['signup_token']).exists():
@@ -31,7 +31,10 @@ class AllAuthCustomAdapter(DefaultAccountAdapter):
default = datetime.datetime.now()
c = caches['default'].get_or_set(email, default, timeout=360)
if c == default:
super(AllAuthCustomAdapter, self).send_mail(template_prefix, email, context)
try:
super(AllAuthCustomAdapter, self).send_mail(template_prefix, email, context)
except Exception: # dont fail signup just because confirmation mail could not be send
pass
else:
messages.add_message(self.request, messages.ERROR, _('In order to prevent spam, the requested email was not send. Please wait a few minutes and try again.'))
else:

View File

@@ -10,4 +10,5 @@ def context_settings(request):
'TERMS_URL': settings.TERMS_URL,
'PRIVACY_URL': settings.PRIVACY_URL,
'IMPRINT_URL': settings.IMPRINT_URL,
'SHOPPING_MIN_AUTOSYNC_INTERVAL': settings.SHOPPING_MIN_AUTOSYNC_INTERVAL,
}

View File

@@ -38,10 +38,12 @@ def get_filetype(name):
# TODO this whole file needs proper documentation, refactoring, and testing
# TODO also add env variable to define which images sizes should be compressed
def handle_image(request, image_object, filetype='.jpeg'):
# filetype argument can not be optional, otherwise this function will treat all images as if they were a jpeg
# Because it's no longer optional, no reason to return it
def handle_image(request, image_object, filetype):
if (image_object.size / 1000) > 500: # if larger than 500 kb compress
if filetype == '.jpeg' or filetype == '.jpg':
return rescale_image_jpeg(image_object), filetype
return rescale_image_jpeg(image_object)
if filetype == '.png':
return rescale_image_png(image_object), filetype
return image_object, filetype
return rescale_image_png(image_object)
return image_object

View File

@@ -4,7 +4,7 @@ import unicodedata
from django.core.cache import caches
from cookbook.models import Unit, Food, Automation
from cookbook.models import Unit, Food, Automation, Ingredient
class IngredientParser:
@@ -46,7 +46,7 @@ class IngredientParser:
def apply_food_automation(self, food):
"""
Apply food alias automations to passed foood
Apply food alias automations to passed food
:param food: unit as string
:return: food as string (possibly changed by automation)
"""
@@ -124,7 +124,7 @@ class IngredientParser:
def parse_amount(self, x):
amount = 0
unit = ''
unit = None
note = ''
did_check_frac = False
@@ -155,33 +155,36 @@ class IngredientParser:
except ValueError:
unit = x[end:]
if unit.startswith('(') or unit.startswith('-'): # i dont know any unit that starts with ( or - so its likely an alternative like 1L (500ml) Water or 2-3
unit = ''
if unit is not None and unit.strip() == '':
unit = None
if unit is not None and (unit.startswith('(') or unit.startswith('-')): # i dont know any unit that starts with ( or - so its likely an alternative like 1L (500ml) Water or 2-3
unit = None
note = x
return amount, unit, note
def parse_ingredient_with_comma(self, tokens):
ingredient = ''
def parse_food_with_comma(self, tokens):
food = ''
note = ''
start = 0
# search for first occurrence of an argument ending in a comma
while start < len(tokens) and not tokens[start].endswith(','):
start += 1
if start == len(tokens):
# no token ending in a comma found -> use everything as ingredient
ingredient = ' '.join(tokens)
# no token ending in a comma found -> use everything as food
food = ' '.join(tokens)
else:
ingredient = ' '.join(tokens[:start + 1])[:-1]
food = ' '.join(tokens[:start + 1])[:-1]
note = ' '.join(tokens[start + 1:])
return ingredient, note
return food, note
def parse_ingredient(self, tokens):
ingredient = ''
def parse_food(self, tokens):
food = ''
note = ''
if tokens[-1].endswith(')'):
# Check if the matching opening bracket is in the same token
if (not tokens[-1].startswith('(')) and ('(' in tokens[-1]):
return self.parse_ingredient_with_comma(tokens)
return self.parse_food_with_comma(tokens)
# last argument ends with closing bracket -> look for opening bracket
start = len(tokens) - 1
while not tokens[start].startswith('(') and not start == 0:
@@ -191,33 +194,51 @@ class IngredientParser:
raise ValueError
elif start < 0:
# no opening bracket anywhere -> just ignore the last bracket
ingredient, note = self.parse_ingredient_with_comma(tokens)
food, note = self.parse_food_with_comma(tokens)
else:
# opening bracket found -> split in ingredient and note, remove brackets from note # noqa: E501
# opening bracket found -> split in food and note, remove brackets from note # noqa: E501
note = ' '.join(tokens[start:])[1:-1]
ingredient = ' '.join(tokens[:start])
food = ' '.join(tokens[:start])
else:
ingredient, note = self.parse_ingredient_with_comma(tokens)
return ingredient, note
food, note = self.parse_food_with_comma(tokens)
return food, note
def parse(self, x):
def parse(self, ingredient):
"""
Main parsing function, takes an ingredient string (e.g. '1 l Water') and extracts amount, unit, food, ...
:param ingredient: string ingredient
:return: amount, unit (can be None), food, note (can be empty)
"""
# initialize default values
amount = 0
unit = ''
ingredient = ''
unit = None
food = ''
note = ''
unit_note = ''
if len(ingredient) == 0:
raise ValueError('string to parse cannot be empty')
# some people/languages put amount and unit at the end of the ingredient string
# if something like this is detected move it to the beginning so the parser can handle it
if len(ingredient) < 1000 and re.search(r'^([^\W\d_])+(.)*[1-9](\d)*\s*([^\W\d_])+', ingredient):
match = re.search(r'[1-9](\d)*\s*([^\W\d_])+', ingredient)
print(f'reording from {ingredient} to {ingredient[match.start():match.end()] + " " + ingredient.replace(ingredient[match.start():match.end()], "")}')
ingredient = ingredient[match.start():match.end()] + ' ' + ingredient.replace(ingredient[match.start():match.end()], '')
# if the string contains parenthesis early on remove it and place it at the end
# because its likely some kind of note
if re.match('(.){1,6}\s\((.[^\(\)])+\)\s', x):
match = re.search('\((.[^\(])+\)', x)
x = x[:match.start()] + x[match.end():] + ' ' + x[match.start():match.end()]
if re.match('(.){1,6}\s\((.[^\(\)])+\)\s', ingredient):
match = re.search('\((.[^\(])+\)', ingredient)
ingredient = ingredient[:match.start()] + ingredient[match.end():] + ' ' + ingredient[match.start():match.end()]
tokens = x.split()
# leading spaces before commas result in extra tokens, clean them out
ingredient = ingredient.replace(' ,', ',')
tokens = ingredient.split() # split at each space into tokens
if len(tokens) == 1:
# there only is one argument, that must be the ingredient
ingredient = tokens[0]
# there only is one argument, that must be the food
food = tokens[0]
else:
try:
# try to parse first argument as amount
@@ -227,48 +248,65 @@ class IngredientParser:
# a fraction for the amount
if len(tokens) > 2:
try:
if not unit == '':
if unit is not None:
# a unit is already found, no need to try the second argument for a fraction
# probably not the best method to do it, but I didn't want to make an if check and paste the exact same thing in the else as already is in the except # noqa: E501
# probably not the best method to do it, but I didn't want to make an if check and paste the exact same thing in the else as already is in the except
raise ValueError
# try to parse second argument as amount and add that, in case of '2 1/2' or '2 ½'
amount += self.parse_fraction(tokens[1])
# assume that units can't end with a comma
if len(tokens) > 3 and not tokens[2].endswith(','):
# try to use third argument as unit and everything else as ingredient, use everything as ingredient if it fails # noqa: E501
# try to use third argument as unit and everything else as food, use everything as food if it fails
try:
ingredient, note = self.parse_ingredient(tokens[3:])
food, note = self.parse_food(tokens[3:])
unit = tokens[2]
except ValueError:
ingredient, note = self.parse_ingredient(tokens[2:])
food, note = self.parse_food(tokens[2:])
else:
ingredient, note = self.parse_ingredient(tokens[2:])
food, note = self.parse_food(tokens[2:])
except ValueError:
# assume that units can't end with a comma
if not tokens[1].endswith(','):
# try to use second argument as unit and everything else as ingredient, use everything as ingredient if it fails # noqa: E501
# try to use second argument as unit and everything else as food, use everything as food if it fails
try:
ingredient, note = self.parse_ingredient(tokens[2:])
if unit == '':
food, note = self.parse_food(tokens[2:])
if unit is None:
unit = tokens[1]
else:
note = tokens[1]
except ValueError:
ingredient, note = self.parse_ingredient(tokens[1:])
food, note = self.parse_food(tokens[1:])
else:
ingredient, note = self.parse_ingredient(tokens[1:])
food, note = self.parse_food(tokens[1:])
else:
# only two arguments, first one is the amount
# which means this is the ingredient
ingredient = tokens[1]
# which means this is the food
food = tokens[1]
except ValueError:
try:
# can't parse first argument as amount
# -> no unit -> parse everything as ingredient
ingredient, note = self.parse_ingredient(tokens)
# -> no unit -> parse everything as food
food, note = self.parse_food(tokens)
except ValueError:
ingredient = ' '.join(tokens[1:])
food = ' '.join(tokens[1:])
if unit_note not in note:
note += ' ' + unit_note
return amount, self.apply_unit_automation(unit.strip()), self.apply_food_automation(ingredient.strip()), note.strip()
if unit:
unit = self.apply_unit_automation(unit.strip())
food = self.apply_food_automation(food.strip())
if len(food) > Food._meta.get_field('name').max_length: # test if food name is to long
# try splitting it at a space and taking only the first arg
if len(food.split()) > 1 and len(food.split()[0]) < Food._meta.get_field('name').max_length:
note = ' '.join(food.split()[1:]) + ' ' + note
food = food.split()[0]
else:
note = food + ' ' + note
food = food[:Food._meta.get_field('name').max_length]
if len(food.strip()) == 0:
raise ValueError(f'Error parsing string {ingredient}, food cannot be empty')
return amount, unit, food, note[:Ingredient._meta.get_field('note').max_length].strip()

View File

@@ -73,9 +73,9 @@ class UrlizePattern(markdown.inlinepatterns.Pattern):
class UrlizeExtension(markdown.Extension):
""" Urlize Extension for Python-Markdown. """
def extendMarkdown(self, md, md_globals):
def extendMarkdown(self, md):
""" Replace autolink with UrlizePattern """
md.inlinePatterns['autolink'] = UrlizePattern(URLIZE_RE, md)
md.inlinePatterns.register(UrlizePattern(URLIZE_RE, md), 'autolink', 120)
def makeExtension(*args, **kwargs):

View File

@@ -1,18 +1,19 @@
"""
Source: https://djangosnippets.org/snippets/1703/
"""
import inspect
from django.conf import settings
from django.contrib import messages
from django.contrib.auth.decorators import user_passes_test
from django.core.cache import caches
from django.core.exceptions import ValidationError
from django.core.cache import cache
from django.core.exceptions import ValidationError, ObjectDoesNotExist
from django.http import HttpResponseRedirect
from django.urls import reverse, reverse_lazy
from django.utils.translation import gettext as _
from oauth2_provider.contrib.rest_framework import TokenHasScope, TokenHasReadWriteScope
from oauth2_provider.models import AccessToken
from rest_framework import permissions
from rest_framework.permissions import SAFE_METHODS
from cookbook.models import ShareLink
from cookbook.models import ShareLink, Recipe, UserSpace
def get_allowed_groups(groups_required):
@@ -30,11 +31,12 @@ def get_allowed_groups(groups_required):
return groups_allowed
def has_group_permission(user, groups):
def has_group_permission(user, groups, no_cache=False):
"""
Tests if a given user is member of a certain group (or any higher group)
Superusers always bypass permission checks.
Unauthenticated users can't be member of any group thus always return false.
:param no_cache: (optional) do not return cached results, always check agains DB
:param user: django auth user object
:param groups: list or tuple of groups the user should be checked for
:return: True if user is in allowed groups, false otherwise
@@ -42,10 +44,24 @@ def has_group_permission(user, groups):
if not user.is_authenticated:
return False
groups_allowed = get_allowed_groups(groups)
CACHE_KEY = hash((inspect.stack()[0][3], (user.pk, user.username, user.email), groups_allowed))
if not no_cache:
cached_result = cache.get(CACHE_KEY, default=None)
if cached_result is not None:
return cached_result
result = False
print('running check', user, groups_allowed)
if user.is_authenticated:
if bool(user.groups.filter(name__in=groups_allowed)):
return True
return False
if user_space := user.userspace_set.filter(active=True):
if len(user_space) != 1:
result = False # do not allow any group permission if more than one space is active, needs to be changed when simultaneous multi-space-tenancy is added
elif bool(user_space.first().groups.filter(name__in=groups_allowed)):
result = True
cache.set(CACHE_KEY, result, timeout=10)
return result
def is_object_owner(user, obj):
@@ -53,7 +69,6 @@ def is_object_owner(user, obj):
Tests if a given user is the owner of a given object
test performed by checking user against the objects user
and create_by field (if exists)
superusers bypass all checks, unauthenticated users cannot own anything
:param user django auth user object
:param obj any object that should be tested
:return: true if user is owner of object, false otherwise
@@ -66,11 +81,25 @@ def is_object_owner(user, obj):
return False
def is_space_owner(user, obj):
"""
Tests if a given user is the owner the space of a given object
:param user django auth user object
:param obj any object that should be tested
:return: true if user is owner of the objects space, false otherwise
"""
if not user.is_authenticated:
return False
try:
return obj.get_space().get_owner() == user
except Exception:
return False
def is_object_shared(user, obj):
"""
Tests if a given user is shared for a given object
test performed by checking user against the objects shared table
superusers bypass all checks, unauthenticated users cannot own anything
:param user django auth user object
:param obj any object that should be tested
:return: true if user is shared for object, false otherwise
@@ -91,7 +120,7 @@ def share_link_valid(recipe, share):
"""
try:
CACHE_KEY = f'recipe_share_{recipe.pk}_{share}'
if c := caches['default'].get(CACHE_KEY, False):
if c := cache.get(CACHE_KEY, False):
return c
if link := ShareLink.objects.filter(recipe=recipe, uuid=share, abuse_blocked=False).first():
@@ -99,7 +128,7 @@ def share_link_valid(recipe, share):
return False
link.request_count += 1
link.save()
caches['default'].set(CACHE_KEY, True, timeout=3)
cache.set(CACHE_KEY, True, timeout=3)
return True
return False
except ValidationError:
@@ -166,7 +195,7 @@ class OwnerRequiredMixin(object):
try:
obj = self.get_object()
if obj.get_space() != request.space:
if not request.user.userspace.filter(space=obj.get_space()).exists():
messages.add_message(request, messages.ERROR,
_('You do not have the required permissions to view this page!'))
return HttpResponseRedirect(reverse_lazy('index'))
@@ -184,7 +213,7 @@ class CustomIsOwner(permissions.BasePermission):
verifies user has ownership over object
(either user or created_by or user is request user)
"""
message = _('You cannot interact with this object as it is not owned by you!') # noqa: E501
message = _('You cannot interact with this object as it is not owned by you!')
def has_permission(self, request, view):
return request.user.is_authenticated
@@ -193,6 +222,28 @@ class CustomIsOwner(permissions.BasePermission):
return is_object_owner(request.user, obj)
class CustomIsOwnerReadOnly(CustomIsOwner):
def has_permission(self, request, view):
return super().has_permission(request, view) and request.method in SAFE_METHODS
def has_object_permission(self, request, view, obj):
return super().has_object_permission(request, view) and request.method in SAFE_METHODS
class CustomIsSpaceOwner(permissions.BasePermission):
"""
Custom permission class for django rest framework views
verifies if the user is the owner of the space the object belongs to
"""
message = _('You cannot interact with this object as it is not owned by you!')
def has_permission(self, request, view):
return request.user.is_authenticated and request.space.created_by == request.user
def has_object_permission(self, request, view, obj):
return is_space_owner(request.user, obj)
# TODO function duplicate/too similar name
class CustomIsShared(permissions.BasePermission):
"""
@@ -262,3 +313,125 @@ class CustomIsShare(permissions.BasePermission):
if share:
return share_link_valid(obj, share)
return False
class CustomRecipePermission(permissions.BasePermission):
"""
Custom permission class for recipe api endpoint
"""
message = _('You do not have the required permissions to view this page!')
def has_permission(self, request, view): # user is either at least a guest or a share link is given and the request is safe
share = request.query_params.get('share', None)
return has_group_permission(request.user, ['guest']) or (share and request.method in SAFE_METHODS and 'pk' in view.kwargs)
def has_object_permission(self, request, view, obj):
share = request.query_params.get('share', None)
if share:
return share_link_valid(obj, share)
else:
if obj.private:
return ((obj.created_by == request.user) or (request.user in obj.shared.all())) and obj.space == request.space
else:
return has_group_permission(request.user, ['guest']) and obj.space == request.space
class CustomUserPermission(permissions.BasePermission):
"""
Custom permission class for user api endpoint
"""
message = _('You do not have the required permissions to view this page!')
def has_permission(self, request, view): # a space filtered user list is visible for everyone
return has_group_permission(request.user, ['guest'])
def has_object_permission(self, request, view, obj): # object write permissions are only available for user
if request.method in SAFE_METHODS and 'pk' in view.kwargs and has_group_permission(request.user, ['guest']) and request.space in obj.userspace_set.all():
return True
elif request.user == obj:
return True
else:
return False
class CustomTokenHasScope(TokenHasScope):
"""
Custom implementation of Django OAuth Toolkit TokenHasScope class
Only difference: if any other authentication method except OAuth2Authentication is used the scope check is ignored
IMPORTANT: do not use this class without any other permission class as it will not check anything besides token scopes
"""
def has_permission(self, request, view):
if type(request.auth) == AccessToken:
return super().has_permission(request, view)
else:
return request.user.is_authenticated
class CustomTokenHasReadWriteScope(TokenHasReadWriteScope):
"""
Custom implementation of Django OAuth Toolkit TokenHasReadWriteScope class
Only difference: if any other authentication method except OAuth2Authentication is used the scope check is ignored
IMPORTANT: do not use this class without any other permission class as it will not check anything besides token scopes
"""
def has_permission(self, request, view):
if type(request.auth) == AccessToken:
return super().has_permission(request, view)
else:
return True
def above_space_limit(space): # TODO add file storage limit
"""
Test if the space has reached any limit (e.g. max recipes, users, ..)
:param space: Space to test for limits
:return: Tuple (True if above or equal any limit else false, message)
"""
r_limit, r_msg = above_space_recipe_limit(space)
u_limit, u_msg = above_space_user_limit(space)
return r_limit or u_limit, (r_msg + ' ' + u_msg).strip()
def above_space_recipe_limit(space):
"""
Test if a space has reached its recipe limit
:param space: Space to test for limits
:return: Tuple (True if above or equal limit else false, message)
"""
limit = space.max_recipes != 0 and Recipe.objects.filter(space=space).count() >= space.max_recipes
if limit:
return True, _('You have reached the maximum number of recipes for your space.')
return False, ''
def above_space_user_limit(space):
"""
Test if a space has reached its user limit
:param space: Space to test for limits
:return: Tuple (True if above or equal limit else false, message)
"""
limit = space.max_users != 0 and UserSpace.objects.filter(space=space).count() > space.max_users
if limit:
return True, _('You have more users than allowed in your space.')
return False, ''
def switch_user_active_space(user, space):
"""
Switch the currently active space of a user by setting all spaces to inactive and activating the one passed
:param user: user to change active space for
:param space: space to activate user for
:return user space object or none if not found/no permission
"""
try:
us = UserSpace.objects.get(space=space, user=user)
if not us.active:
UserSpace.objects.filter(user=user).update(active=False)
us.active = True
us.save()
return us
else:
return us
except ObjectDoesNotExist:
return None

View File

@@ -1,194 +1,191 @@
import json
import re
from json import JSONDecodeError
from urllib.parse import unquote
# import json
# import re
# from json import JSONDecodeError
# from urllib.parse import unquote
from bs4 import BeautifulSoup
from bs4.element import Tag
from recipe_scrapers._utils import get_host_name, normalize_string
# from bs4 import BeautifulSoup
# from bs4.element import Tag
# from recipe_scrapers import scrape_html, scrape_me
# from recipe_scrapers._exceptions import NoSchemaFoundInWildMode
# from recipe_scrapers._utils import get_host_name, normalize_string
from cookbook.helper import recipe_url_import as helper
from cookbook.helper.scrapers.scrapers import text_scraper
# from cookbook.helper import recipe_url_import as helper
# from cookbook.helper.scrapers.scrapers import text_scraper
def get_recipe_from_source(text, url, request):
def build_node(k, v):
if isinstance(v, dict):
node = {
'name': k,
'value': k,
'children': get_children_dict(v)
}
elif isinstance(v, list):
node = {
'name': k,
'value': k,
'children': get_children_list(v)
}
else:
node = {
'name': k + ": " + normalize_string(str(v)),
'value': normalize_string(str(v))
}
return node
# def get_recipe_from_source(text, url, request):
# def build_node(k, v):
# if isinstance(v, dict):
# node = {
# 'name': k,
# 'value': k,
# 'children': get_children_dict(v)
# }
# elif isinstance(v, list):
# node = {
# 'name': k,
# 'value': k,
# 'children': get_children_list(v)
# }
# else:
# node = {
# 'name': k + ": " + normalize_string(str(v)),
# 'value': normalize_string(str(v))
# }
# return node
def get_children_dict(children):
kid_list = []
for k, v in children.items():
kid_list.append(build_node(k, v))
return kid_list
# def get_children_dict(children):
# kid_list = []
# for k, v in children.items():
# kid_list.append(build_node(k, v))
# return kid_list
def get_children_list(children):
kid_list = []
for kid in children:
if type(kid) == list:
node = {
'name': "unknown list",
'value': "unknown list",
'children': get_children_list(kid)
}
kid_list.append(node)
elif type(kid) == dict:
for k, v in kid.items():
kid_list.append(build_node(k, v))
else:
kid_list.append({
'name': normalize_string(str(kid)),
'value': normalize_string(str(kid))
})
return kid_list
# def get_children_list(children):
# kid_list = []
# for kid in children:
# if type(kid) == list:
# node = {
# 'name': "unknown list",
# 'value': "unknown list",
# 'children': get_children_list(kid)
# }
# kid_list.append(node)
# elif type(kid) == dict:
# for k, v in kid.items():
# kid_list.append(build_node(k, v))
# else:
# kid_list.append({
# 'name': normalize_string(str(kid)),
# 'value': normalize_string(str(kid))
# })
# return kid_list
recipe_json = {
'name': '',
'url': '',
'description': '',
'image': '',
'keywords': [],
'recipeIngredient': [],
'recipeInstructions': '',
'servings': '',
'prepTime': '',
'cookTime': ''
}
recipe_tree = []
parse_list = []
html_data = []
images = []
text = unquote(text)
# recipe_tree = []
# parse_list = []
# soup = BeautifulSoup(text, "html.parser")
# html_data = get_from_html(soup)
# images = get_images_from_source(soup, url)
# text = unquote(text)
# scrape = None
try:
parse_list.append(remove_graph(json.loads(text)))
if not url and 'url' in parse_list[0]:
url = parse_list[0]['url']
scrape = text_scraper("<script type='application/ld+json'>" + text + "</script>", url=url)
# if url and not text:
# try:
# scrape = scrape_me(url_path=url, wild_mode=True)
# except(NoSchemaFoundInWildMode):
# pass
except JSONDecodeError:
soup = BeautifulSoup(text, "html.parser")
html_data = get_from_html(soup)
images += get_images_from_source(soup, url)
for el in soup.find_all('script', type='application/ld+json'):
el = remove_graph(el)
if not url and 'url' in el:
url = el['url']
if type(el) == list:
for le in el:
parse_list.append(le)
elif type(el) == dict:
parse_list.append(el)
for el in soup.find_all(type='application/json'):
el = remove_graph(el)
if type(el) == list:
for le in el:
parse_list.append(le)
elif type(el) == dict:
parse_list.append(el)
scrape = text_scraper(text, url=url)
# if not scrape:
# try:
# parse_list.append(remove_graph(json.loads(text)))
# if not url and 'url' in parse_list[0]:
# url = parse_list[0]['url']
# scrape = text_scraper("<script type='application/ld+json'>" + text + "</script>", url=url)
recipe_json = helper.get_from_scraper(scrape, request)
# except JSONDecodeError:
# for el in soup.find_all('script', type='application/ld+json'):
# el = remove_graph(el)
# if not url and 'url' in el:
# url = el['url']
# if type(el) == list:
# for le in el:
# parse_list.append(le)
# elif type(el) == dict:
# parse_list.append(el)
# for el in soup.find_all(type='application/json'):
# el = remove_graph(el)
# if type(el) == list:
# for le in el:
# parse_list.append(le)
# elif type(el) == dict:
# parse_list.append(el)
# scrape = text_scraper(text, url=url)
for el in parse_list:
temp_tree = []
if isinstance(el, Tag):
try:
el = json.loads(el.string)
except TypeError:
continue
# recipe_json = helper.get_from_scraper(scrape, request)
for k, v in el.items():
if isinstance(v, dict):
node = {
'name': k,
'value': k,
'children': get_children_dict(v)
}
elif isinstance(v, list):
node = {
'name': k,
'value': k,
'children': get_children_list(v)
}
else:
node = {
'name': k + ": " + normalize_string(str(v)),
'value': normalize_string(str(v))
}
temp_tree.append(node)
# # TODO: DEPRECATE recipe_tree & html_data. first validate it isn't used anywhere
# for el in parse_list:
# temp_tree = []
# if isinstance(el, Tag):
# try:
# el = json.loads(el.string)
# except TypeError:
# continue
if '@type' in el and el['@type'] == 'Recipe':
recipe_tree += [{'name': 'ld+json', 'children': temp_tree}]
else:
recipe_tree += [{'name': 'json', 'children': temp_tree}]
# for k, v in el.items():
# if isinstance(v, dict):
# node = {
# 'name': k,
# 'value': k,
# 'children': get_children_dict(v)
# }
# elif isinstance(v, list):
# node = {
# 'name': k,
# 'value': k,
# 'children': get_children_list(v)
# }
# else:
# node = {
# 'name': k + ": " + normalize_string(str(v)),
# 'value': normalize_string(str(v))
# }
# temp_tree.append(node)
return recipe_json, recipe_tree, html_data, images
# if '@type' in el and el['@type'] == 'Recipe':
# recipe_tree += [{'name': 'ld+json', 'children': temp_tree}]
# else:
# recipe_tree += [{'name': 'json', 'children': temp_tree}]
# return recipe_json, recipe_tree, html_data, images
def get_from_html(soup):
INVISIBLE_ELEMS = ('style', 'script', 'head', 'title')
html = []
for s in soup.strings:
if ((s.parent.name not in INVISIBLE_ELEMS) and (len(s.strip()) > 0)):
html.append(s)
return html
# def get_from_html(soup):
# INVISIBLE_ELEMS = ('style', 'script', 'head', 'title')
# html = []
# for s in soup.strings:
# if ((s.parent.name not in INVISIBLE_ELEMS) and (len(s.strip()) > 0)):
# html.append(s)
# return html
def get_images_from_source(soup, url):
sources = ['src', 'srcset', 'data-src']
images = []
img_tags = soup.find_all('img')
if url:
site = get_host_name(url)
prot = url.split(':')[0]
# def get_images_from_source(soup, url):
# sources = ['src', 'srcset', 'data-src']
# images = []
# img_tags = soup.find_all('img')
# if url:
# site = get_host_name(url)
# prot = url.split(':')[0]
urls = []
for img in img_tags:
for src in sources:
try:
urls.append(img[src])
except KeyError:
pass
# urls = []
# for img in img_tags:
# for src in sources:
# try:
# urls.append(img[src])
# except KeyError:
# pass
for u in urls:
u = u.split('?')[0]
filename = re.search(r'/([\w_-]+[.](jpg|jpeg|gif|png))$', u)
if filename:
if (('http' not in u) and (url)):
# sometimes an image source can be relative
# if it is provide the base url
u = '{}://{}{}'.format(prot, site, u)
if 'http' in u:
images.append(u)
return images
# for u in urls:
# u = u.split('?')[0]
# filename = re.search(r'/([\w_-]+[.](jpg|jpeg|gif|png))$', u)
# if filename:
# if (('http' not in u) and (url)):
# # sometimes an image source can be relative
# # if it is provide the base url
# u = '{}://{}{}'.format(prot, site, u)
# if 'http' in u:
# images.append(u)
# return images
def remove_graph(el):
# recipes type might be wrapped in @graph type
if isinstance(el, Tag):
try:
el = json.loads(el.string)
if '@graph' in el:
for x in el['@graph']:
if '@type' in x and x['@type'] == 'Recipe':
el = x
except (TypeError, JSONDecodeError):
pass
return el
# def remove_graph(el):
# # recipes type might be wrapped in @graph type
# if isinstance(el, Tag):
# try:
# el = json.loads(el.string)
# if '@graph' in el:
# for x in el['@graph']:
# if '@type' in x and x['@type'] == 'Recipe':
# el = x
# except (TypeError, JSONDecodeError):
# pass
# return el

View File

@@ -3,17 +3,16 @@ from collections import Counter
from datetime import date, timedelta
from django.contrib.postgres.search import SearchQuery, SearchRank, SearchVector, TrigramSimilarity
from django.core.cache import cache
from django.core.cache import caches
from django.db.models import Avg, Case, Count, F, Func, Max, OuterRef, Q, Subquery, Sum, Value, When
from django.db.models import (Avg, Case, Count, Exists, F, Func, Max, OuterRef, Q, Subquery, Value, When, FilteredRelation)
from django.db.models.functions import Coalesce, Lower, Substr
from django.utils import timezone, translation
from django.utils.translation import gettext as _
from cookbook.filters import RecipeFilter
from cookbook.helper.HelperFunctions import Round, str2bool
from cookbook.helper.permission_helper import has_group_permission
from cookbook.managers import DICTIONARY
from cookbook.models import (CookLog, CustomFilter, Food, Keyword, Recipe, RecipeBook, SearchFields,
from cookbook.models import (CookLog, CustomFilter, Food, Keyword, Recipe, SearchFields,
SearchPreference, ViewLog)
from recipes import settings
@@ -23,7 +22,7 @@ from recipes import settings
class RecipeSearch():
_postgres = settings.DATABASES['default']['ENGINE'] in ['django.db.backends.postgresql_psycopg2', 'django.db.backends.postgresql']
def __init__(self, request, **params):
def __init__(self, request, **params):
self._request = request
self._queryset = None
if f := params.get('filter', None):
@@ -37,7 +36,13 @@ class RecipeSearch():
else:
self._params = {**(params or {})}
if self._request.user.is_authenticated:
self._search_prefs = request.user.searchpreference
CACHE_KEY = f'search_pref_{request.user.id}'
cached_result = cache.get(CACHE_KEY, default=None)
if cached_result is not None:
self._search_prefs = cached_result
else:
self._search_prefs = request.user.searchpreference
cache.set(CACHE_KEY, self._search_prefs, timeout=10)
else:
self._search_prefs = SearchPreference()
self._string = self._params.get('query').strip() if self._params.get('query', None) else None
@@ -112,19 +117,20 @@ class RecipeSearch():
)
self.search_rank = None
self.orderby = []
self._default_sort = ['-favorite'] # TODO add user setting
self._filters = None
self._fuzzy_match = None
def get_queryset(self, queryset):
self._queryset = queryset
self._queryset = self._queryset.prefetch_related('keywords')
self._build_sort_order()
self._recently_viewed(num_recent=self._num_recent)
self._cooked_on_filter(cooked_date=self._cookedon)
self._created_on_filter(created_date=self._createdon)
self._updated_on_filter(updated_date=self._updatedon)
self._viewed_on_filter(viewed_date=self._viewedon)
self._favorite_recipes(timescooked=self._timescooked)
self._favorite_recipes(times_cooked=self._timescooked)
self._new_recipes()
self.keyword_filters(**self._keywords)
self.food_filters(**self._foods)
@@ -147,11 +153,11 @@ class RecipeSearch():
def _build_sort_order(self):
if self._random:
self._queryset = self._queryset.order_by("?")
self.orderby = ['?']
else:
order = []
# TODO add userpreference for default sort order and replace '-favorite'
default_order = ['-favorite']
default_order = ['-name']
# recent and new_recipe are always first; they float a few recipes to the top
if self._num_recent:
order += ['-recent']
@@ -208,7 +214,7 @@ class RecipeSearch():
else:
self._queryset = self._queryset.annotate(simularity=Coalesce(Subquery(simularity), 0.0))
if self._sort_includes('score') and self._fulltext_include and self._fuzzy_match is not None:
self._queryset = self._queryset.annotate(score=F('rank')+F('simularity'))
self._queryset = self._queryset.annotate(score=F('rank') + F('simularity'))
else:
query_filter = Q()
for f in [x + '__unaccent__iexact' if x in self._unaccent_include else x + '__iexact' for x in SearchFields.objects.all().values_list('field', flat=True)]:
@@ -289,25 +295,25 @@ class RecipeSearch():
'recipe').annotate(recent=Max('created_at')).order_by('-recent')[:num_recent]
self._queryset = self._queryset.annotate(recent=Coalesce(Max(Case(When(pk__in=num_recent_recipes.values('recipe'), then='viewlog__pk'))), Value(0)))
def _favorite_recipes(self, timescooked=None):
if self._sort_includes('favorite') or timescooked:
lessthan = '-' in (timescooked or []) or not self._sort_includes('-favorite')
if lessthan:
def _favorite_recipes(self, times_cooked=None):
if self._sort_includes('favorite') or times_cooked:
less_than = '-' in (times_cooked or []) or not self._sort_includes('-favorite')
if less_than:
default = 1000
else:
default = 0
favorite_recipes = CookLog.objects.filter(created_by=self._request.user, space=self._request.space, recipe=OuterRef('pk')
).values('recipe').annotate(count=Count('pk', distinct=True)).values('count')
self._queryset = self._queryset.annotate(favorite=Coalesce(Subquery(favorite_recipes), default))
if timescooked is None:
if times_cooked is None:
return
if timescooked == '0':
if times_cooked == '0':
self._queryset = self._queryset.filter(favorite=0)
elif lessthan:
self._queryset = self._queryset.filter(favorite__lte=int(timescooked[1:])).exclude(favorite=0)
elif less_than:
self._queryset = self._queryset.filter(favorite__lte=int(times_cooked[1:])).exclude(favorite=0)
else:
self._queryset = self._queryset.filter(favorite__gte=int(timescooked))
self._queryset = self._queryset.filter(favorite__gte=int(times_cooked))
def keyword_filters(self, **kwargs):
if all([kwargs[x] is None for x in kwargs]):
@@ -507,10 +513,10 @@ class RecipeSearch():
shopping_users = [*self._request.user.get_shopping_share(), self._request.user]
onhand_filter = (
Q(steps__ingredients__food__onhand_users__in=shopping_users) # food onhand
| Q(steps__ingredients__food__substitute__onhand_users__in=shopping_users) # or substitute food onhand
| Q(steps__ingredients__food__in=self.__children_substitute_filter(shopping_users))
| Q(steps__ingredients__food__in=self.__sibling_substitute_filter(shopping_users))
Q(steps__ingredients__food__onhand_users__in=shopping_users) # food onhand
| Q(steps__ingredients__food__substitute__onhand_users__in=shopping_users) # or substitute food onhand
| Q(steps__ingredients__food__in=self.__children_substitute_filter(shopping_users))
| Q(steps__ingredients__food__in=self.__sibling_substitute_filter(shopping_users))
)
makenow_recipes = Recipe.objects.annotate(
count_food=Count('steps__ingredients__food__pk', filter=Q(steps__ingredients__food__isnull=False), distinct=True),
@@ -519,36 +525,40 @@ class RecipeSearch():
steps__ingredients__food__recipe__isnull=True), distinct=True),
has_child_sub=Case(When(steps__ingredients__food__in=self.__children_substitute_filter(shopping_users), then=Value(1)), default=Value(0)),
has_sibling_sub=Case(When(steps__ingredients__food__in=self.__sibling_substitute_filter(shopping_users), then=Value(1)), default=Value(0))
).annotate(missingfood=F('count_food')-F('count_onhand')-F('count_ignore_shopping')).filter(missingfood=missing)
).annotate(missingfood=F('count_food') - F('count_onhand') - F('count_ignore_shopping')).filter(missingfood=missing)
self._queryset = self._queryset.distinct().filter(id__in=makenow_recipes.values('id'))
@ staticmethod
@staticmethod
def __children_substitute_filter(shopping_users=None):
children_onhand_subquery = Food.objects.filter(
path__startswith=Substr(OuterRef('path'), 1, Food.steplen*OuterRef('depth')),
path__startswith=OuterRef('path'),
depth__gt=OuterRef('depth'),
onhand_users__in=shopping_users
).annotate(child_onhand=Coalesce(Func('pk', function='Count'), 0)).values('child_onhand')
)
return Food.objects.exclude( # list of foods that are onhand and children of: foods that are not onhand and are set to use children as substitutes
Q(onhand_users__in=shopping_users)
| Q(ignore_shopping=True, recipe__isnull=True)
| Q(substitute__onhand_users__in=shopping_users)
).exclude(depth=1, numchild=0).filter(substitute_children=True
).annotate(child_onhand=Coalesce(Subquery(children_onhand_subquery), 0)).exclude(child_onhand=0)
).exclude(depth=1, numchild=0
).filter(substitute_children=True
).annotate(child_onhand_count=Exists(children_onhand_subquery)
).filter(child_onhand_count=True)
@ staticmethod
@staticmethod
def __sibling_substitute_filter(shopping_users=None):
sibling_onhand_subquery = Food.objects.filter(
path__startswith=Substr(OuterRef('path'), 1, Food.steplen*(OuterRef('depth')-1)),
path__startswith=Substr(OuterRef('path'), 1, Food.steplen * (OuterRef('depth') - 1)),
depth=OuterRef('depth'),
onhand_users__in=shopping_users
).annotate(sibling_onhand=Coalesce(Func('pk', function='Count'), 0)).values('sibling_onhand')
)
return Food.objects.exclude( # list of foods that are onhand and siblings of: foods that are not onhand and are set to use siblings as substitutes
Q(onhand_users__in=shopping_users)
| Q(ignore_shopping=True, recipe__isnull=True)
| Q(substitute__onhand_users__in=shopping_users)
).exclude(depth=1, numchild=0).filter(substitute_siblings=True
).annotate(sibling_onhand=Coalesce(Subquery(sibling_onhand_subquery), 0)).exclude(sibling_onhand=0)
).exclude(depth=1, numchild=0
).filter(substitute_siblings=True
).annotate(sibling_onhand=Exists(sibling_onhand_subquery)
).filter(sibling_onhand=True)
class RecipeFacet():
@@ -561,7 +571,7 @@ class RecipeFacet():
self._request = request
self._queryset = queryset
self.hash_key = hash_key or str(hash(frozenset(self._queryset.values_list('pk'))))
self.hash_key = hash_key or str(hash(self._queryset.query))
self._SEARCH_CACHE_KEY = f"recipes_filter_{self.hash_key}"
self._cache_timeout = cache_timeout
self._cache = caches['default'].get(self._SEARCH_CACHE_KEY, {})
@@ -741,7 +751,7 @@ class RecipeFacet():
).filter(depth=depth, count__gt=0
).values('id', 'name', 'count', 'numchild').order_by(Lower('name').asc())[:200]
else:
return queryset.filter(depth=depth).values('id', 'name', 'numchild').order_by(Lower('name').asc())
return queryset.filter(depth=depth).values('id', 'name', 'numchild').order_by(Lower('name').asc())
def _food_queryset(self, queryset, food=None):
depth = getattr(food, 'depth', 0) + 1
@@ -753,13 +763,3 @@ class RecipeFacet():
).values('id', 'name', 'count', 'numchild').order_by(Lower('name').asc())[:200]
else:
return queryset.filter(depth__lte=depth).values('id', 'name', 'numchild').order_by(Lower('name').asc())
def old_search(request):
if has_group_permission(request.user, ('guest',)):
params = dict(request.GET)
params['internal'] = None
f = RecipeFilter(params,
queryset=Recipe.objects.filter(space=request.user.userpreference.space).all().order_by(Lower('name').asc()),
space=request.space)
return f.qs

View File

@@ -7,12 +7,15 @@ from django.utils.dateparse import parse_duration
from django.utils.translation import gettext as _
from isodate import parse_duration as iso_parse_duration
from isodate.isoerror import ISO8601Error
from recipe_scrapers._utils import get_minutes
from pytube import YouTube
from recipe_scrapers._utils import get_host_name, get_minutes
from cookbook.helper import recipe_url_import as helper
from cookbook.helper.ingredient_parser import IngredientParser
from cookbook.models import Keyword
# from recipe_scrapers._utils import get_minutes ## temporary until/unless upstream incorporates get_minutes() PR
def get_from_scraper(scrape, request):
# converting the scrape_me object to the existing json format based on ld+json
@@ -28,7 +31,7 @@ def get_from_scraper(scrape, request):
recipe_json['name'] = ''
try:
description = scrape.description() or None
description = scrape.description() or None
except Exception:
description = None
if not description:
@@ -37,45 +40,37 @@ def get_from_scraper(scrape, request):
except Exception:
description = ''
recipe_json['description'] = parse_description(description)
recipe_json['internal'] = True
try:
servings = scrape.yields() or None
servings = scrape.schema.data.get('recipeYield') or 1 # dont use scrape.yields() as this will always return "x servings" or "x items", should be improved in scrapers directly
except Exception:
servings = None
if not servings:
try:
servings = scrape.schema.data.get('recipeYield') or 1
except Exception:
servings = 1
if type(servings) != int:
try:
servings = int(re.findall(r'\b\d+\b', servings)[0])
except Exception:
servings = 1
recipe_json['servings'] = max(servings, 1)
servings = 1
recipe_json['servings'] = parse_servings(servings)
recipe_json['servings_text'] = parse_servings_text(servings)
try:
recipe_json['prepTime'] = get_minutes(scrape.prep_time()) or 0
recipe_json['working_time'] = get_minutes(scrape.prep_time()) or 0
except Exception:
try:
recipe_json['prepTime'] = get_minutes(scrape.schema.data.get("prepTime")) or 0
recipe_json['working_time'] = get_minutes(scrape.schema.data.get("prepTime")) or 0
except Exception:
recipe_json['prepTime'] = 0
recipe_json['working_time'] = 0
try:
recipe_json['cookTime'] = get_minutes(scrape.cook_time()) or 0
recipe_json['waiting_time'] = get_minutes(scrape.cook_time()) or 0
except Exception:
try:
recipe_json['cookTime'] = get_minutes(scrape.schema.data.get("cookTime")) or 0
recipe_json['waiting_time'] = get_minutes(scrape.schema.data.get("cookTime")) or 0
except Exception:
recipe_json['cookTime'] = 0
recipe_json['waiting_time'] = 0
if recipe_json['cookTime'] + recipe_json['prepTime'] == 0:
if recipe_json['working_time'] + recipe_json['waiting_time'] == 0:
try:
recipe_json['prepTime'] = get_minutes(scrape.total_time()) or 0
recipe_json['working_time'] = get_minutes(scrape.total_time()) or 0
except Exception:
try:
recipe_json['prepTime'] = get_minutes(scrape.schema.data.get("totalTime")) or 0
recipe_json['working_time'] = get_minutes(scrape.schema.data.get("totalTime")) or 0
except Exception:
pass
@@ -113,6 +108,21 @@ def get_from_scraper(scrape, request):
keywords += listify_keywords(scrape.schema.data.get("recipeCuisine"))
except Exception:
pass
try:
source_url = scrape.canonical_url()
except Exception:
try:
source_url = scrape.url
except Exception:
pass
if source_url:
recipe_json['source_url'] = source_url
try:
keywords.append(source_url.replace('http://', '').replace('https://', '').split('/')[0])
except Exception:
pass
try:
recipe_json['keywords'] = parse_keywords(list(set(map(str.casefold, keywords))), request.space)
except AttributeError:
@@ -120,55 +130,84 @@ def get_from_scraper(scrape, request):
ingredient_parser = IngredientParser(request, True)
ingredients = []
recipe_json['steps'] = []
try:
for i in parse_instructions(scrape.instructions()):
recipe_json['steps'].append({'instruction': i, 'ingredients': [], })
except Exception:
pass
if len(recipe_json['steps']) == 0:
recipe_json['steps'].append({'instruction': '', 'ingredients': [], })
if len(parse_description(description)) > 256: # split at 256 as long descriptions dont look good on recipe cards
recipe_json['steps'][0]['instruction'] = f'*{parse_description(description)}* \n\n' + recipe_json['steps'][0]['instruction']
else:
recipe_json['description'] = parse_description(description)[:512]
try:
for x in scrape.ingredients():
try:
amount, unit, ingredient, note = ingredient_parser.parse(x)
ingredients.append(
{
'amount': amount,
'unit': {
'text': unit,
'id': random.randrange(10000, 99999)
},
'ingredient': {
'text': ingredient,
'id': random.randrange(10000, 99999)
},
'note': note,
'original_text': x
}
)
ingredient = {
'amount': amount,
'food': {
'name': ingredient,
},
'unit': None,
'note': note,
'original_text': x
}
if unit:
ingredient['unit'] = {'name': unit, }
recipe_json['steps'][0]['ingredients'].append(ingredient)
except Exception:
ingredients.append(
recipe_json['steps'][0]['ingredients'].append(
{
'amount': 0,
'unit': {
'text': '',
'id': random.randrange(10000, 99999)
},
'ingredient': {
'text': x,
'id': random.randrange(10000, 99999)
'unit': None,
'food': {
'name': x,
},
'note': '',
'original_text': x
}
)
recipe_json['recipeIngredient'] = ingredients
except Exception:
recipe_json['recipeIngredient'] = ingredients
pass
return recipe_json
def get_from_youtube_scraper(url, request):
"""A YouTube Information Scraper."""
kw, created = Keyword.objects.get_or_create(name='YouTube', space=request.space)
default_recipe_json = {
'name': '',
'internal': True,
'description': '',
'servings': 1,
'working_time': 0,
'waiting_time': 0,
'image': "",
'keywords': [{'name': kw.name, 'label': kw.name, 'id': kw.pk}],
'source_url': url,
'steps': [
{
'ingredients': [],
'instruction': ''
}
]
}
try:
recipe_json['recipeInstructions'] = parse_instructions(scrape.instructions())
video = YouTube(url=url)
default_recipe_json['name'] = video.title
default_recipe_json['image'] = video.thumbnail_url
default_recipe_json['steps'][0]['instruction'] = video.description
except Exception:
recipe_json['recipeInstructions'] = ""
pass
if scrape.canonical_url():
recipe_json['url'] = scrape.canonical_url()
recipe_json['recipeInstructions'] += "\n\n" + _("Imported from") + ": " + scrape.canonical_url()
return recipe_json
return default_recipe_json
def parse_name(name):
@@ -180,102 +219,46 @@ def parse_name(name):
return normalize_string(name)
def parse_ingredients(ingredients):
# some pages have comma separated ingredients in a single array entry
try:
if type(ingredients[0]) == dict:
return ingredients
except (KeyError, IndexError):
pass
if (len(ingredients) == 1 and type(ingredients) == list):
ingredients = ingredients[0].split(',')
elif type(ingredients) == str:
ingredients = ingredients.split(',')
for x in ingredients:
if '\n' in x:
ingredients.remove(x)
for i in x.split('\n'):
ingredients.insert(0, i)
ingredient_list = []
for x in ingredients:
if x.replace(' ', '') != '':
x = x.replace('&frac12;', "0.5").replace('&frac14;', "0.25").replace('&frac34;', "0.75")
try:
amount, unit, ingredient, note = parse_single_ingredient(x)
if ingredient:
ingredient_list.append(
{
'amount': amount,
'unit': {
'text': unit,
'id': random.randrange(10000, 99999)
},
'ingredient': {
'text': ingredient,
'id': random.randrange(10000, 99999)
},
'note': note,
'original_text': x
}
)
except Exception:
ingredient_list.append(
{
'amount': 0,
'unit': {
'text': '',
'id': random.randrange(10000, 99999)
},
'ingredient': {
'text': x,
'id': random.randrange(10000, 99999)
},
'note': '',
'original_text': x
}
)
ingredients = ingredient_list
else:
ingredients = []
return ingredients
def parse_description(description):
return normalize_string(description)
def parse_instructions(instructions):
instruction_text = ''
# flatten instructions if they are in a list
if type(instructions) == list:
for i in instructions:
if type(i) == str:
instruction_text += i
else:
if 'text' in i:
instruction_text += i['text'] + '\n\n'
elif 'itemListElement' in i:
for ile in i['itemListElement']:
if type(ile) == str:
instruction_text += ile + '\n\n'
elif 'text' in ile:
instruction_text += ile['text'] + '\n\n'
else:
instruction_text += str(i)
instructions = instruction_text
normalized_string = normalize_string(instructions)
def clean_instruction_string(instruction):
normalized_string = normalize_string(instruction)
normalized_string = normalized_string.replace('\n', ' \n')
normalized_string = normalized_string.replace(' \n \n', '\n\n')
return normalized_string
def parse_instructions(instructions):
"""
Convert arbitrary instructions object from website import and turn it into a flat list of strings
:param instructions: any instructions object from import
:return: list of strings (from one to many elements depending on website)
"""
instruction_list = []
if type(instructions) == list:
for i in instructions:
if type(i) == str:
instruction_list.append(clean_instruction_string(i))
else:
if 'text' in i:
instruction_list.append(clean_instruction_string(i['text']))
elif 'itemListElement' in i:
for ile in i['itemListElement']:
if type(ile) == str:
instruction_list.append(clean_instruction_string(ile))
elif 'text' in ile:
instruction_list.append(clean_instruction_string(ile['text']))
else:
instruction_list.append(clean_instruction_string(str(i)))
else:
instruction_list.append(clean_instruction_string(instructions))
return instruction_list
def parse_image(image):
# check if list of images is returned, take first if so
if not image:
@@ -310,40 +293,31 @@ def parse_servings(servings):
return servings
def parse_cooktime(cooktime):
if type(cooktime) not in [int, float]:
def parse_servings_text(servings):
if type(servings) == str:
try:
cooktime = float(re.search(r'\d+', cooktime).group())
servings = re.sub("\d+", '', servings).strip()
except Exception:
servings = ''
return str(servings)[:32]
def parse_time(recipe_time):
if type(recipe_time) not in [int, float]:
try:
recipe_time = float(re.search(r'\d+', recipe_time).group())
except (ValueError, AttributeError):
try:
cooktime = round(iso_parse_duration(cooktime).seconds / 60)
recipe_time = round(iso_parse_duration(recipe_time).seconds / 60)
except ISO8601Error:
try:
if (type(cooktime) == list and len(cooktime) > 0):
cooktime = cooktime[0]
cooktime = round(parse_duration(cooktime).seconds / 60)
if (type(recipe_time) == list and len(recipe_time) > 0):
recipe_time = recipe_time[0]
recipe_time = round(parse_duration(recipe_time).seconds / 60)
except AttributeError:
cooktime = 0
recipe_time = 0
return cooktime
def parse_preptime(preptime):
if type(preptime) not in [int, float]:
try:
preptime = float(re.search(r'\d+', preptime).group())
except ValueError:
try:
preptime = round(iso_parse_duration(preptime).seconds / 60)
except ISO8601Error:
try:
if (type(preptime) == list and len(preptime) > 0):
preptime = preptime[0]
preptime = round(parse_duration(preptime).seconds / 60)
except AttributeError:
preptime = 0
return preptime
return recipe_time
def parse_keywords(keyword_json, space):
@@ -353,9 +327,9 @@ def parse_keywords(keyword_json, space):
kw = normalize_string(kw)
if len(kw) != 0:
if k := Keyword.objects.filter(name=kw, space=space).first():
keywords.append({'id': str(k.id), 'text': str(k.name)})
keywords.append({'label': str(k), 'name': k.name, 'id': k.id})
else:
keywords.append({'id': random.randrange(1111111, 9999999, 1), 'text': kw})
keywords.append({'label': kw, 'name': kw})
return keywords
@@ -393,3 +367,32 @@ def iso_duration_to_minutes(string):
string
).groupdict()
return int(match['days'] or 0) * 24 * 60 + int(match['hours'] or 0) * 60 + int(match['minutes'] or 0)
def get_images_from_soup(soup, url):
sources = ['src', 'srcset', 'data-src']
images = []
img_tags = soup.find_all('img')
if url:
site = get_host_name(url)
prot = url.split(':')[0]
urls = []
for img in img_tags:
for src in sources:
try:
urls.append(img[src])
except KeyError:
pass
for u in urls:
u = u.split('?')[0]
filename = re.search(r'/([\w_-]+[.](jpg|jpeg|gif|png))$', u)
if filename:
if (('http' not in u) and (url)):
# sometimes an image source can be relative
# if it is provide the base url
u = '{}://{}{}'.format(prot, site, u)
if 'http' in u:
images.append(u)
return images

View File

@@ -1,5 +1,6 @@
from django.urls import reverse
from django_scopes import scope, scopes_disabled
from oauth2_provider.contrib.rest_framework import OAuth2Authentication
from rest_framework.authentication import TokenAuthentication
from rest_framework.authtoken.models import Token
from rest_framework.exceptions import AuthenticationFailed
@@ -14,6 +15,12 @@ class ScopeMiddleware:
def __call__(self, request):
prefix = settings.JS_REVERSE_SCRIPT_PREFIX or ''
# need to disable scopes for writing requests into userpref and enable for loading ?
if request.path.startswith(prefix + '/api/user-preference/'):
with scopes_disabled():
return self.get_response(request)
if request.user.is_authenticated:
if request.path.startswith(prefix + '/admin/'):
@@ -26,24 +33,35 @@ class ScopeMiddleware:
if request.path.startswith(prefix + '/accounts/'):
return self.get_response(request)
with scopes_disabled():
if request.user.userpreference.space is None and not reverse('account_logout') in request.path:
return views.no_space(request)
if request.path.startswith(prefix + '/switch-space/'):
return self.get_response(request)
if request.user.groups.count() == 0 and not reverse('account_logout') in request.path:
with scopes_disabled():
if request.user.userspace_set.count() == 0 and not reverse('account_logout') in request.path:
return views.space_overview(request)
# get active user space, if for some reason more than one space is active select first (group permission checks will fail, this is not intended at this point)
user_space = request.user.userspace_set.filter(active=True).first()
if not user_space:
return views.space_overview(request)
if user_space.groups.count() == 0 and not reverse('account_logout') in request.path:
return views.no_groups(request)
request.space = request.user.userpreference.space
request.space = user_space.space
# with scopes_disabled():
with scope(space=request.space):
return self.get_response(request)
else:
if request.path.startswith(prefix + '/api/'):
try:
if auth := TokenAuthentication().authenticate(request):
request.space = auth[0].userpreference.space
with scope(space=request.space):
return self.get_response(request)
if auth := OAuth2Authentication().authenticate(request):
user_space = auth[0].userspace_set.filter(active=True).first()
if user_space:
request.space = user_space.space
with scope(space=request.space):
return self.get_response(request)
except AuthenticationFailed:
pass

View File

@@ -1,5 +1,6 @@
from bs4 import BeautifulSoup
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
@@ -26,17 +27,17 @@ def text_scraper(text, url=None):
class TextScraper(scraper_class):
def __init__(
self,
page_data,
url=None
html=None,
url=None,
):
self.wild_mode = False
self.meta_http_equiv = False
self.soup = BeautifulSoup(page_data, "html.parser")
self.soup = BeautifulSoup(html, "html.parser")
self.url = url
self.recipe = None
try:
self.schema = SchemaOrg(page_data)
self.schema = SchemaOrg(html)
except (JSONDecodeError, AttributeError):
pass
return TextScraper(text, url)
return TextScraper(url=url, html=text)

View File

@@ -6,11 +6,13 @@ from gettext import gettext as _
from io import BytesIO
import requests
import validators
import yaml
from cookbook.helper.ingredient_parser import IngredientParser
from cookbook.helper.recipe_html_import import get_recipe_from_source
from cookbook.helper.recipe_url_import import iso_duration_to_minutes
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 cookbook.integration.integration import Integration
from cookbook.models import Ingredient, Keyword, Recipe, Step
@@ -23,7 +25,10 @@ class CookBookApp(Integration):
def get_recipe_from_file(self, file):
recipe_html = file.getvalue().decode("utf-8")
recipe_json, recipe_tree, html_data, images = get_recipe_from_source(recipe_html, 'CookBookApp', self.request)
# recipe_json, recipe_tree, html_data, images = get_recipe_from_source(recipe_html, 'CookBookApp', self.request)
scrape = text_scraper(text=recipe_html)
recipe_json = get_from_scraper(scrape, self.request)
images = list(dict.fromkeys(get_images_from_soup(scrape.soup, None)))
recipe = Recipe.objects.create(
name=recipe_json['name'].strip(),
@@ -41,7 +46,8 @@ class CookBookApp(Integration):
except Exception:
pass
step = Step.objects.create(instruction=recipe_json['recipeInstructions'], space=self.request.space, )
# assuming import files only contain single step
step = Step.objects.create(instruction=recipe_json['steps'][0]['instruction'], space=self.request.space, )
if 'nutrition' in recipe_json:
step.instruction = step.instruction + '\n\n' + recipe_json['nutrition']
@@ -50,17 +56,21 @@ class CookBookApp(Integration):
recipe.steps.add(step)
ingredient_parser = IngredientParser(self.request, True)
for ingredient in recipe_json['recipeIngredient']:
f = ingredient_parser.get_food(ingredient['ingredient']['text'])
u = ingredient_parser.get_unit(ingredient['unit']['text'])
for ingredient in recipe_json['steps'][0]['ingredients']:
f = ingredient_parser.get_food(ingredient['food']['name'])
u = None
if unit := ingredient.get('unit', None):
u = ingredient_parser.get_unit(unit.get('name', None))
step.ingredients.add(Ingredient.objects.create(
food=f, unit=u, amount=ingredient['amount'], note=ingredient['note'], space=self.request.space,
food=f, unit=u, amount=ingredient.get('amount', None), note=ingredient.get('note', None), original_text=ingredient.get('original_text', None), space=self.request.space,
))
if len(images) > 0:
try:
response = requests.get(images[0])
self.import_recipe_image(recipe, BytesIO(response.content))
url = images[0]
if validators.url(url, public=True):
response = requests.get(url)
self.import_recipe_image(recipe, BytesIO(response.content))
except Exception as e:
print('failed to import image ', str(e))

View File

@@ -0,0 +1,88 @@
import base64
import json
from io import BytesIO
from gettext import gettext as _
import requests
import validators
from lxml import etree
from cookbook.helper.ingredient_parser import IngredientParser
from cookbook.helper.recipe_url_import import parse_servings, parse_time, parse_servings_text
from cookbook.integration.integration import Integration
from cookbook.models import Ingredient, Keyword, Recipe, Step
class Cookmate(Integration):
def import_file_name_filter(self, zip_info_object):
return zip_info_object.filename.endswith('.xml')
def get_files_from_recipes(self, recipes, el, cookie):
raise NotImplementedError('Method not implemented in storage integration')
def get_recipe_from_file(self, file):
recipe_xml = file
recipe = Recipe.objects.create(
name=recipe_xml.find('title').text.strip(),
created_by=self.request.user, internal=True, space=self.request.space)
if recipe_xml.find('preptime') is not None and recipe_xml.find('preptime').text is not None:
recipe.working_time = parse_time(recipe_xml.find('preptime').text.strip())
if recipe_xml.find('cooktime') is not None and recipe_xml.find('cooktime').text is not None:
recipe.waiting_time = parse_time(recipe_xml.find('cooktime').text.strip())
if recipe_xml.find('quantity') is not None and recipe_xml.find('quantity').text is not None:
recipe.servings = parse_servings(recipe_xml.find('quantity').text.strip())
recipe.servings_text = parse_servings_text(recipe_xml.find('quantity').text.strip())
if recipe_xml.find('url') is not None and recipe_xml.find('url').text is not None:
recipe.source_url = recipe_xml.find('url').text.strip()
if recipe_xml.find('description') is not None: # description is a list of <li>'s with text
if len(recipe_xml.find('description')) > 0:
recipe.description = recipe_xml.find('description')[0].text[:512]
if recipe_text := recipe_xml.find('recipetext'):
for step in recipe_text.getchildren():
if step.text:
step = Step.objects.create(
instruction=step.text.strip(), space=self.request.space,
)
recipe.steps.add(step)
ingredient_parser = IngredientParser(self.request, True)
if recipe_ingredients := recipe_xml.find('ingredient'):
ingredient_step = recipe.steps.first()
if ingredient_step is None:
ingredient_step = Step.objects.create(space=self.request.space, instruction='')
for ingredient in recipe_ingredients.getchildren():
if ingredient.text:
if ingredient.text.strip() != '':
amount, unit, food, note = ingredient_parser.parse(ingredient.text.strip())
f = ingredient_parser.get_food(food)
u = ingredient_parser.get_unit(unit)
ingredient_step.ingredients.add(Ingredient.objects.create(
food=f, unit=u, amount=amount, note=note, original_text=ingredient.text.strip(), space=self.request.space,
))
if recipe_xml.find('imageurl') is not None:
try:
url = recipe_xml.find('imageurl').text.strip()
if validators.url(url, public=True):
response = requests.get(url)
self.import_recipe_image(recipe, BytesIO(response.content))
except Exception as e:
print('failed to import image ', str(e))
recipe.save()
return recipe
def get_file_from_recipe(self, recipe):
raise NotImplementedError('Method not implemented in storage integration')

View File

@@ -2,11 +2,10 @@ import re
from io import BytesIO
from zipfile import ZipFile
from bs4 import BeautifulSoup
from bs4 import BeautifulSoup, Tag
from django.utils.translation import gettext as _
from cookbook.helper.ingredient_parser import IngredientParser
from cookbook.helper.recipe_html_import import get_recipe_from_source
from cookbook.helper.recipe_url_import import iso_duration_to_minutes, parse_servings
from cookbook.integration.integration import Integration
from cookbook.models import Ingredient, Keyword, Recipe, Step
@@ -22,50 +21,89 @@ class CopyMeThat(Integration):
def get_recipe_from_file(self, file):
# 'file' comes is as a beautifulsoup object
recipe = Recipe.objects.create(name=file.find("div", {"id": "name"}).text.strip(), created_by=self.request.user, internal=True, space=self.request.space, )
try:
source = file.find("a", {"id": "original_link"}).text
except AttributeError:
source = None
recipe = Recipe.objects.create(name=file.find("div", {"id": "name"}).text.strip()[:128], source_url=source, created_by=self.request.user, internal=True, space=self.request.space, )
for category in file.find_all("span", {"class": "recipeCategory"}):
keyword, created = Keyword.objects.get_or_create(name=category.text, space=self.request.space)
recipe.keywords.add(keyword)
try:
recipe.servings = parse_servings(file.find("a", {"id": "recipeYield"}).text.strip())
recipe.working_time = iso_duration_to_minutes(file.find("span", {"meta": "prepTime"}).text.strip())
recipe.waiting_time = iso_duration_to_minutes(file.find("span", {"meta": "cookTime"}).text.strip())
recipe.save()
except AttributeError:
pass
try:
if len(file.find("span", {"id": "starred"}).text.strip()) > 0:
recipe.keywords.add(Keyword.objects.get_or_create(space=self.request.space, name=_('Favorite'))[0])
except AttributeError:
pass
try:
if len(file.find("span", {"id": "made_this"}).text.strip()) > 0:
recipe.keywords.add(Keyword.objects.get_or_create(space=self.request.space, name=_('I made this'))[0])
except AttributeError:
pass
step = Step.objects.create(instruction='', space=self.request.space, )
ingredient_parser = IngredientParser(self.request, True)
for ingredient in file.find_all("li", {"class": "recipeIngredient"}):
if ingredient.text == "":
continue
amount, unit, food, note = ingredient_parser.parse(ingredient.text.strip())
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.text.strip(), space=self.request.space,
))
for s in file.find_all("li", {"class": "instruction"}):
if s.text == "":
continue
step.instruction += s.text.strip() + ' \n\n'
ingredients = file.find("ul", {"id": "recipeIngredients"})
if isinstance(ingredients, Tag):
for ingredient in ingredients.children:
if not isinstance(ingredient, Tag) or not ingredient.text.strip() or "recipeIngredient_spacer" in ingredient['class']:
continue
if any(x in ingredient['class'] for x in ["recipeIngredient_subheader", "recipeIngredient_note"]):
step.ingredients.add(Ingredient.objects.create(is_header=True, note=ingredient.text.strip()[:256], original_text=ingredient.text.strip(), space=self.request.space, ))
else:
amount, unit, food, note = ingredient_parser.parse(ingredient.text.strip())
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.text.strip(), space=self.request.space, ))
for s in file.find_all("li", {"class": "recipeNote"}):
if s.text == "":
continue
step.instruction += s.text.strip() + ' \n\n'
instructions = file.find("ol", {"id": "recipeInstructions"})
if isinstance(instructions, Tag):
for instruction in instructions.children:
if not isinstance(instruction, Tag) or instruction.text == "":
continue
if "instruction_subheader" in instruction['class']:
if step.instruction:
step.save()
recipe.steps.add(step)
step = Step.objects.create(instruction='', space=self.request.space, )
step.name = instruction.text.strip()[:128]
else:
step.instruction += instruction.text.strip() + ' \n\n'
notes = file.find_all("li", {"class": "recipeNote"})
if notes:
step.instruction += '*Notes:* \n\n'
for n in notes:
if n.text == "":
continue
step.instruction += '*' + n.text.strip() + '* \n\n'
description = ''
try:
if file.find("a", {"id": "original_link"}).text != '':
step.instruction += "\n\n" + _("Imported from") + ": " + file.find("a", {"id": "original_link"}).text
step.save()
description = file.find("div", {"id": "description"}).text.strip()
except AttributeError:
pass
if len(description) <= 512:
recipe.description = description
else:
recipe.description = description[:480] + ' ... (full description below)'
step.instruction += '*Description:* \n\n*' + description + '* \n\n'
step.save()
recipe.steps.add(step)
# import the Primary recipe image that is stored in the Zip

View File

@@ -5,6 +5,8 @@ import traceback
import uuid
from io import BytesIO, StringIO
from zipfile import BadZipFile, ZipFile
import lxml
from django.core.cache import cache
import datetime
@@ -16,6 +18,7 @@ from django.http import HttpResponse
from django.utils.formats import date_format
from django.utils.translation import gettext as _
from django_scopes import scope
from lxml import etree
from cookbook.forms import ImportExportBase
from cookbook.helper.image_processing import get_filetype, handle_image
@@ -40,7 +43,7 @@ class Integration:
self.export_type = export_type
self.ignored_recipes = []
description = f'Imported by {request.user.get_user_name()} at {date_format(datetime.datetime.now(), "DATETIME_FORMAT")}. Type: {export_type}'
description = f'Imported by {request.user.get_user_display_name()} at {date_format(datetime.datetime.now(), "DATETIME_FORMAT")}. Type: {export_type}'
icon = '📥'
try:
@@ -144,7 +147,7 @@ class Integration:
il.imported_recipes += 1
il.save()
import_zip.close()
elif '.zip' in f['name'] or '.paprikarecipes' in f['name']:
elif '.zip' in f['name'] or '.paprikarecipes' in f['name'] or '.mcb' in f['name']:
import_zip = ZipFile(f['file'])
file_list = []
for z in import_zip.filelist:
@@ -157,9 +160,16 @@ class Integration:
file_list = self.split_recipe_file(BytesIO(import_zip.read('recipes.html')))
il.total_recipes += len(file_list)
if isinstance(self, cookbook.integration.cookmate.Cookmate):
new_file_list = []
for file in file_list:
new_file_list += etree.parse(BytesIO(import_zip.read(file.filename))).getroot().getchildren()
il.total_recipes = len(new_file_list)
file_list = new_file_list
for z in file_list:
try:
if isinstance(z, Tag):
if not hasattr(z, 'filename') or type(z) == Tag:
recipe = self.get_recipe_from_file(z)
else:
recipe = self.get_recipe_from_file(BytesIO(import_zip.read(z.filename)))
@@ -172,7 +182,7 @@ class Integration:
traceback.print_exc()
self.handle_exception(e, log=il, message=f'-------------------- \nERROR \n{e}\n--------------------\n')
import_zip.close()
elif '.json' in f['name'] or '.txt' in f['name'] or '.mmf' in f['name'] or '.rk' in f['name']:
elif '.json' in f['name'] or '.txt' in f['name'] or '.mmf' in f['name'] or '.rk' in f['name'] or '.melarecipe' in f['name']:
data_list = self.split_recipe_file(f['file'])
il.total_recipes += len(data_list)
for d in data_list:
@@ -243,7 +253,7 @@ class Integration:
:param image_file: ByteIO stream containing the image
:param filetype: type of file to write bytes to, default to .jpeg if unknown
"""
recipe.image = File(handle_image(self.request, File(image_file, name='image'), filetype=filetype)[0], name=f'{uuid.uuid4()}_{recipe.pk}{filetype}')
recipe.image = File(handle_image(self.request, File(image_file, name='image'), filetype=filetype), name=f'{uuid.uuid4()}_{recipe.pk}{filetype}')
recipe.save()
def get_recipe_from_file(self, file):

View File

@@ -0,0 +1,83 @@
import base64
import json
from io import BytesIO
from gettext import gettext as _
from cookbook.helper.ingredient_parser import IngredientParser
from cookbook.helper.recipe_url_import import parse_servings, parse_time
from cookbook.integration.integration import Integration
from cookbook.models import Ingredient, Keyword, Recipe, Step
class MelaRecipes(Integration):
def split_recipe_file(self, file):
return [json.loads(file.getvalue().decode("utf-8"))]
def get_files_from_recipes(self, recipes, el, cookie):
raise NotImplementedError('Method not implemented in storage integration')
def get_recipe_from_file(self, file):
recipe_json = file
recipe = Recipe.objects.create(
name=recipe_json['title'].strip(),
created_by=self.request.user, internal=True, space=self.request.space)
if 'yield' in recipe_json:
recipe.servings = parse_servings(recipe_json['yield'])
if 'cookTime' in recipe_json:
recipe.waiting_time = parse_time(recipe_json['cookTime'])
if 'prepTime' in recipe_json:
recipe.working_time = parse_time(recipe_json['prepTime'])
if 'favorite' in recipe_json and recipe_json['favorite']:
recipe.keywords.add(Keyword.objects.get_or_create(space=self.request.space, name=_('Favorite'))[0])
if 'categories' in recipe_json:
try:
for x in recipe_json['categories']:
recipe.keywords.add(Keyword.objects.get_or_create(space=self.request.space, name=x)[0])
except Exception:
pass
instruction = ''
if 'text' in recipe_json:
instruction += f'*{recipe_json["text"].strip()}* \n'
if 'instructions' in recipe_json:
instruction += recipe_json["instructions"].strip() + ' \n'
if 'notes' in recipe_json:
instruction += recipe_json["notes"].strip() + ' \n'
if 'link' in recipe_json:
recipe.source_url = recipe_json['link']
step = Step.objects.create(
instruction=instruction, space=self.request.space,
)
ingredient_parser = IngredientParser(self.request, True)
for ingredient in recipe_json['ingredients'].split('\n'):
if ingredient.strip() != '':
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 recipe_json.get("images", None):
try:
self.import_recipe_image(recipe, BytesIO(base64.b64decode(recipe_json['images'][0])), filetype='.jpeg')
except Exception:
pass
return recipe
def get_file_from_recipe(self, recipe):
raise NotImplementedError('Method not implemented in storage integration')

View File

@@ -31,6 +31,9 @@ class NextcloudCookbook(Integration):
except Exception:
pass
if 'url' in recipe_json:
recipe.source_url = recipe_json['url'].strip()
if 'recipeCategory' in recipe_json:
try:
recipe.keywords.add(Keyword.objects.get_or_create(space=self.request.space, name=recipe_json['recipeCategory'])[0])
@@ -40,7 +43,8 @@ class NextcloudCookbook(Integration):
if 'keywords' in recipe_json:
try:
for x in recipe_json['keywords'].split(','):
recipe.keywords.add(Keyword.objects.get_or_create(space=self.request.space, name=x)[0])
if x.strip() != '':
recipe.keywords.add(Keyword.objects.get_or_create(space=self.request.space, name=x)[0])
except Exception:
pass

View File

@@ -6,6 +6,7 @@ from gettext import gettext as _
from io import BytesIO
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
from cookbook.models import Ingredient, Keyword, Recipe, Step
@@ -26,10 +27,9 @@ class Paprika(Integration):
recipe.description = '' if len(recipe_json['description'].strip()) > 500 else recipe_json['description'].strip()
try:
if re.match(r'([0-9])+\s(.)*', recipe_json['servings']):
s = recipe_json['servings'].split(' ')
recipe.servings = s[0]
recipe.servings_text = s[1]
if 'servings' in recipe_json:
recipe.servings = parse_servings(recipe_json['servings'])
recipe.servings_text = parse_servings_text(recipe_json['servings'])
if len(recipe_json['cook_time'].strip()) > 0:
recipe.waiting_time = re.findall(r'\d+', recipe_json['cook_time'])[0]

View File

@@ -49,6 +49,7 @@ class Plantoeat(Integration):
)
if tags:
tags = tags.replace('^',',')
for k in tags.split(','):
keyword, created = Keyword.objects.get_or_create(name=k.strip(), space=self.request.space)
recipe.keywords.add(keyword)
@@ -78,7 +79,11 @@ class Plantoeat(Integration):
current_recipe = ''
for fl in file.readlines():
line = fl.decode("windows-1250")
try:
line = fl.decode("utf-8")
except UnicodeDecodeError:
line = fl.decode("windows-1250")
if line.startswith('--------------'):
if current_recipe != '':
recipe_list.append(current_recipe)

View File

@@ -5,6 +5,7 @@ from io import BytesIO
from zipfile import ZipFile
import requests
import validators
from django.utils.translation import gettext as _
from cookbook.helper.image_processing import get_filetype
@@ -123,11 +124,13 @@ class RecetteTek(Integration):
self.import_recipe_image(recipe, BytesIO(import_zip.read(image_file_name)), filetype=get_filetype(image_file_name))
else:
if file['originalPicture'] != '':
response = requests.get(file['originalPicture'])
if imghdr.what(BytesIO(response.content)) is not None:
self.import_recipe_image(recipe, BytesIO(response.content), filetype=get_filetype(file['originalPicture']))
else:
raise Exception("Original image failed to download.")
url = file['originalPicture']
if validators.url(url, public=True):
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']))
else:
raise Exception("Original image failed to download.")
except Exception as e:
print(recipe.name, ': failed to import image ', str(e))

View File

@@ -2,6 +2,7 @@ import json
from io import BytesIO
import requests
import validators
from cookbook.helper.ingredient_parser import IngredientParser
from cookbook.integration.integration import Integration
@@ -51,8 +52,10 @@ class RecipeSage(Integration):
if len(file['image']) > 0:
try:
response = requests.get(file['image'][0])
self.import_recipe_image(recipe, BytesIO(response.content))
url = file['image'][0]
if validators.url(url, public=True):
response = requests.get(url)
self.import_recipe_image(recipe, BytesIO(response.content))
except Exception as e:
print('failed to import image ', str(e))
@@ -77,14 +80,13 @@ class RecipeSage(Integration):
}
for s in recipe.steps.all():
if s.type != Step.TIME:
data['recipeInstructions'].append({
'@type': 'HowToStep',
'text': s.instruction
})
data['recipeInstructions'].append({
'@type': 'HowToStep',
'text': s.instruction
})
for i in s.ingredients.all():
data['recipeIngredient'].append(f'{float(i.amount)} {i.unit} {i.food}')
for i in s.ingredients.all():
data['recipeIngredient'].append(f'{float(i.amount)} {i.unit} {i.food}')
return data

View File

@@ -12,33 +12,33 @@ class RezKonv(Integration):
ingredients = []
directions = []
for line in file.replace('\r', '').split('\n'):
for line in file.replace('\r', '').replace('\n\n', '\n').split('\n'):
if 'Titel:' in line:
title = line.replace('Titel:', '').strip()
if 'Kategorien:' in line:
tags = line.replace('Kategorien:', '').strip()
if ingredient_mode and ('quelle' in line.lower() or 'source' in line.lower()):
if ingredient_mode and (
'quelle' in line.lower() or 'source' in line.lower() or (line == '' and len(ingredients) > 0)):
ingredient_mode = False
direction_mode = True
if ingredient_mode:
if line != '' and '===' not in line and 'Zubereitung' not in line:
ingredients.append(line.strip())
if direction_mode:
if line.strip() != '' and line.strip() != '=====':
directions.append(line.strip())
if 'Zutaten:' in line:
if 'Zutaten:' in line or 'Ingredients' in line or 'Menge:' in line:
ingredient_mode = True
if 'Zubereitung:' in line:
ingredient_mode = False
direction_mode = True
recipe = Recipe.objects.create(name=title, created_by=self.request.user, internal=True, space=self.request.space)
recipe = Recipe.objects.create(name=title, created_by=self.request.user, internal=True,
space=self.request.space)
for k in tags.split(','):
keyword, created = Keyword.objects.get_or_create(name=k.strip(), space=self.request.space)
recipe.keywords.add(keyword)
step = Step.objects.create(
instruction='\n'.join(directions) + '\n\n', space=self.request.space,
instruction=' \n'.join(directions) + '\n\n', space=self.request.space,
)
ingredient_parser = IngredientParser(self.request, True)
@@ -60,7 +60,8 @@ class RezKonv(Integration):
def split_recipe_file(self, file):
recipe_list = []
current_recipe = ''
encoding_list = ['windows-1250', 'latin-1'] #TODO build algorithm to try trough encodings and fail if none work, use for all importers
encoding_list = ['windows-1250',
'latin-1'] # TODO build algorithm to try trough encodings and fail if none work, use for all importers
encoding = 'windows-1250'
for fl in file.readlines():
try:

View File

@@ -71,11 +71,10 @@ class Saffron(Integration):
recipeInstructions = []
recipeIngredient = []
for s in recipe.steps.all():
if s.type != Step.TIME:
recipeInstructions.append(s.instruction)
recipeInstructions.append(s.instruction)
for i in s.ingredients.all():
recipeIngredient.append(f'{float(i.amount)} {i.unit} {i.food}')
for i in s.ingredients.all():
recipeIngredient.append(f'{float(i.amount)} {i.unit} {i.food}')
data += "Ingredients: \n"
for ingredient in recipeIngredient:

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

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

@@ -8,8 +8,8 @@ msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-11-04 12:31+0100\n"
"PO-Revision-Date: 2021-11-06 14:06+0000\n"
"Last-Translator: Nicklas Yli-Länttä <admin@timanttikuutio.eu>\n"
"PO-Revision-Date: 2022-03-18 16:31+0000\n"
"Last-Translator: Stefan Werner <werner@iki.fi>\n"
"Language-Team: Finnish <http://translate.tandoor.dev/projects/tandoor/"
"recipes-backend/fi/>\n"
"Language: fi\n"
@@ -17,7 +17,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.8\n"
"X-Generator: Weblate 4.10.1\n"
#: .\cookbook\filters.py:23 .\cookbook\templates\base.html:125
#: .\cookbook\templates\forms\ingredients.html:34
@@ -31,10 +31,12 @@ msgid ""
"Color of the top navigation bar. Not all colors work with all themes, just "
"try them out!"
msgstr ""
"Ylänavigointipalkin väri. Ei kaikki värit toimi kaikkien teemojen kanssa; "
"kokeile!"
#: .\cookbook\forms.py:55
msgid "Default Unit to be used when inserting a new ingredient into a recipe."
msgstr ""
msgstr "Oletusmittayksikkö uuden aineksen lisäämisessä."
#: .\cookbook\forms.py:57
msgid ""

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

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@@ -8,8 +8,8 @@ msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-09-13 22:40+0200\n"
"PO-Revision-Date: 2021-10-23 09:06+0000\n"
"Last-Translator: rustam <uzbekr@gmail.com>\n"
"PO-Revision-Date: 2022-04-07 19:32+0000\n"
"Last-Translator: Artem Aksenov <artemmillerr@gmail.com>\n"
"Language-Team: Russian <http://translate.tandoor.dev/projects/tandoor/"
"recipes-backend/ru/>\n"
"Language: ru\n"
@@ -18,14 +18,14 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
"X-Generator: Weblate 4.8\n"
"X-Generator: Weblate 4.10.1\n"
#: .\cookbook\filters.py:23 .\cookbook\templates\base.html:125
#: .\cookbook\templates\forms\ingredients.html:34
#: .\cookbook\templates\space.html:43 .\cookbook\templates\stats.html:28
#: .\cookbook\templates\url_import.html:270
msgid "Ingredients"
msgstr "ингредиенты"
msgstr "Ингредиенты"
#: .\cookbook\forms.py:50
msgid ""
@@ -95,14 +95,14 @@ msgstr ""
#: .\cookbook\forms.py:103 .\cookbook\forms.py:334
#: .\cookbook\templates\url_import.html:154
msgid "Name"
msgstr "Имя"
msgstr "Название"
#: .\cookbook\forms.py:104 .\cookbook\forms.py:335
#: .\cookbook\templates\space.html:39 .\cookbook\templates\stats.html:24
#: .\cookbook\templates\url_import.html:188
#: .\cookbook\templates\url_import.html:573 .\cookbook\views\lists.py:112
msgid "Keywords"
msgstr "Ключевые поля"
msgstr "Ключевые слова"
#: .\cookbook\forms.py:105
msgid "Preparation time in minutes"

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

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,8 @@
from django.core.management.commands.dumpdata import Command as DumpdataCommand
from django_scopes import scopes_disabled
class Command(DumpdataCommand):
def handle(self, *args, **options):
with scopes_disabled():
return super().handle(*args, **options)

View File

@@ -0,0 +1,8 @@
from django.core.management.commands.loaddata import Command as LoaddataCommand
from django_scopes import scopes_disabled
class Command(LoaddataCommand):
def handle(self, *args, **options):
with scopes_disabled():
return super().handle(*args, **options)

View File

@@ -16,6 +16,7 @@ DICTIONARY = {
'it': 'italian',
# 'lv': 'Latvian',
'es': 'spanish',
'sv': 'swedish',
}

View File

@@ -4,11 +4,12 @@ from django.db import migrations
def create_default_space(apps, schema_editor):
Space = apps.get_model('cookbook', 'Space')
Space.objects.create(
name='Default',
message=''
)
# Space = apps.get_model('cookbook', 'Space')
# Space.objects.create(
# name='Default',
# message=''
# )
pass # Beginning with the multi space tenancy version (~something around 1.3) a default space is no longer needed as the first user can create it after setup
class Migration(migrations.Migration):

View File

@@ -9,8 +9,15 @@ from django.utils import translation
from django_scopes import scopes_disabled
from cookbook.managers import DICTIONARY
from cookbook.models import (Index, PermissionModelMixin, Recipe, Step, allSearchFields,
nameSearchField)
from cookbook.models import (Index, PermissionModelMixin, Recipe, Step, SearchFields)
def allSearchFields():
return list(SearchFields.objects.values_list('id', flat=True))
def nameSearchField():
return [SearchFields.objects.get(name='Name').id]
def set_default_search_vector(apps, schema_editor):

View File

@@ -2,7 +2,12 @@
from django_scopes import scopes_disabled
from django.db import migrations, models
from cookbook.models import nameSearchField
from cookbook.models import SearchFields
def nameSearchField():
return [SearchFields.objects.get(name='Name').id]
def add_default_trigram(apps, schema_editor):

View File

@@ -0,0 +1,18 @@
# Generated by Django 3.2.12 on 2022-03-04 13:39
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('cookbook', '0172_ingredient_original_text'),
]
operations = [
migrations.AddField(
model_name='recipe',
name='source_url',
field=models.CharField(blank=True, default=None, max_length=1024, null=True),
),
]

View File

@@ -0,0 +1,45 @@
# Generated by Django 4.0.4 on 2022-05-31 14:10
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
from django_scopes import scopes_disabled
def migrate_space_permissions(apps, schema_editor):
with scopes_disabled():
UserPreference = apps.get_model('cookbook', 'UserPreference')
UserSpace = apps.get_model('cookbook', 'UserSpace')
for up in UserPreference.objects.exclude(space=None).all():
us = UserSpace.objects.create(user=up.user, space=up.space, active=True)
us.groups.set(up.user.groups.all())
class Migration(migrations.Migration):
dependencies = [
('auth', '0012_alter_user_first_name_max_length'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('cookbook', '0173_recipe_source_url'),
]
operations = [
migrations.AlterField(
model_name='food',
name='substitute',
field=models.ManyToManyField(blank=True, to='cookbook.food'),
),
migrations.CreateModel(
name='UserSpace',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('active', models.BooleanField(default=False)),
('created_at', models.DateTimeField(auto_now_add=True)),
('updated_at', models.DateTimeField(auto_now=True)),
('groups', models.ManyToManyField(to='auth.group')),
('space', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cookbook.space')),
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
],
),
migrations.RunPython(migrate_space_permissions)
]

View File

@@ -0,0 +1,17 @@
# Generated by Django 4.0.4 on 2022-05-31 14:56
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('cookbook', '0174_alter_food_substitute_userspace'),
]
operations = [
migrations.RemoveField(
model_name='userpreference',
name='space',
),
]

View File

@@ -0,0 +1,28 @@
# Generated by Django 4.0.4 on 2022-06-14 14:48
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('cookbook', '0175_remove_userpreference_space'),
]
operations = [
migrations.AlterField(
model_name='searchpreference',
name='icontains',
field=models.ManyToManyField(blank=True, related_name='icontains_fields', to='cookbook.searchfields'),
),
migrations.AlterField(
model_name='searchpreference',
name='trigram',
field=models.ManyToManyField(blank=True, related_name='trigram_fields', to='cookbook.searchfields'),
),
migrations.AlterField(
model_name='searchpreference',
name='unaccent',
field=models.ManyToManyField(blank=True, related_name='unaccent_fields', to='cookbook.searchfields'),
),
]

View File

@@ -0,0 +1,18 @@
# Generated by Django 4.0.4 on 2022-06-26 10:26
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('cookbook', '0176_alter_searchpreference_icontains_and_more'),
]
operations = [
migrations.AddField(
model_name='recipe',
name='show_ingredient_overview',
field=models.BooleanField(default=True),
),
]

View File

@@ -0,0 +1,21 @@
# Generated by Django 4.0.6 on 2022-07-12 18:04
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('cookbook', '0177_recipe_show_ingredient_overview'),
]
operations = [
migrations.RemoveField(
model_name='userpreference',
name='search_style',
),
migrations.RemoveField(
model_name='userpreference',
name='show_recent',
),
]

View File

@@ -0,0 +1,25 @@
# Generated by Django 4.0.6 on 2022-07-13 10:53
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('cookbook', '0178_remove_userpreference_search_style_and_more'),
]
operations = [
migrations.AddField(
model_name='recipe',
name='private',
field=models.BooleanField(default=False),
),
migrations.AddField(
model_name='recipe',
name='shared',
field=models.ManyToManyField(blank=True, related_name='recipe_shared_with', to=settings.AUTH_USER_MODEL),
),
]

View File

@@ -0,0 +1,18 @@
# Generated by Django 4.0.6 on 2022-07-14 09:20
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('cookbook', '0179_recipe_private_recipe_shared'),
]
operations = [
migrations.AddField(
model_name='invitelink',
name='reusable',
field=models.BooleanField(default=False),
),
]

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