Compare commits

...

1349 Commits

Author SHA1 Message Date
vabene1111
6fc0c02674 started work on supermarket edit view 2021-05-31 18:40:59 +02:00
vabene1111
040af330cc Merge pull request #637 from vabene1111/dependabot/pip/boto3-1.17.84
Bump boto3 from 1.17.83 to 1.17.84
2021-05-31 17:06:56 +02:00
dependabot[bot]
05caad5cfe Bump boto3 from 1.17.83 to 1.17.84
Bumps [boto3](https://github.com/boto/boto3) from 1.17.83 to 1.17.84.
- [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.17.83...1.17.84)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-31 06:14:35 +00:00
Kaibu
7aa1c7b53b minor theme fixes 2021-05-31 01:02:46 +02:00
Kaibu
ad24a44588 new tandoor theme added, minor ux fixes 2021-05-31 00:47:59 +02:00
vabene1111
9f4eb91287 fixed search settinggs cookie 2021-05-30 21:02:32 +02:00
vabene1111
9982cae7c3 persistent search settings 2021-05-30 20:40:46 +02:00
vabene1111
6d065cb939 fixed order 2021-05-30 19:56:34 +02:00
vabene1111
b10163e309 recently viewed 2021-05-30 19:40:46 +02:00
vabene1111
28b8973259 fixed snyc log 2021-05-30 18:37:53 +02:00
vabene1111
4f09970130 fixed frontend localization 2021-05-30 17:12:59 +02:00
vabene1111
e05019d2b1 prevent account spam 2021-05-30 16:16:42 +02:00
vabene1111
3c778927e2 email settings 2021-05-30 15:53:16 +02:00
vabene1111
505b60cb14 fixed recipe tests paths and edit max switch 2021-05-30 09:27:20 +02:00
vabene1111
14ca61b11f Merge pull request #632 from vabene1111/dependabot/pip/boto3-1.17.83
Bump boto3 from 1.17.80 to 1.17.83
2021-05-30 08:58:31 +02:00
vabene1111
22900dc460 Merge pull request #630 from vabene1111/dependabot/pip/drf-writable-nested-0.6.3
Bump drf-writable-nested from 0.6.2 to 0.6.3
2021-05-30 08:58:26 +02:00
vabene1111
28806e6857 Merge pull request #633 from smilerz/fix_url_import
bumped recipe_scrapers and updated expected results
2021-05-29 14:02:15 +02:00
vabene1111
dbf1334ec0 Merge pull request #634 from vabene1111/dependabot/npm_and_yarn/vue/dns-packet-1.3.4
Bump dns-packet from 1.3.1 to 1.3.4 in /vue
2021-05-29 13:57:59 +02:00
dependabot[bot]
7e0d9bfe49 Bump dns-packet from 1.3.1 to 1.3.4 in /vue
Bumps [dns-packet](https://github.com/mafintosh/dns-packet) from 1.3.1 to 1.3.4.
- [Release notes](https://github.com/mafintosh/dns-packet/releases)
- [Changelog](https://github.com/mafintosh/dns-packet/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mafintosh/dns-packet/compare/v1.3.1...v1.3.4)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-29 04:34:13 +00:00
smilerz
56f80acede bumped recipe_scrapers and updated expected results 2021-05-28 12:53:09 -05:00
vabene1111
46a8a9f60d disable password reset if no mail is set 2021-05-28 18:41:30 +02:00
vabene1111
71fdfe6acb ugly space management hack - will be improved later 2021-05-28 18:19:53 +02:00
vabene1111
50572e9a36 space features 2021-05-28 17:48:09 +02:00
vabene1111
c8054349b2 reworked invite system 2021-05-28 16:49:03 +02:00
dependabot[bot]
0ec5d669dd Bump boto3 from 1.17.80 to 1.17.83
Bumps [boto3](https://github.com/boto/boto3) from 1.17.80 to 1.17.83.
- [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.17.80...1.17.83)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-28 05:29:38 +00:00
dependabot[bot]
6dd778112a Bump drf-writable-nested from 0.6.2 to 0.6.3
Bumps [drf-writable-nested](https://github.com/beda-software/drf-writable-nested) from 0.6.2 to 0.6.3.
- [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.2...v0.6.3)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-27 05:46:43 +00:00
vabene1111
a14e33973c signup, reset and other account stuff 2021-05-26 22:36:53 +02:00
vabene1111
a8d01f4d5a fixed test directory finding 2021-05-26 21:34:49 +02:00
vabene1111
58f841a770 s3 support for images 2021-05-26 16:35:48 +02:00
Jesse
c851b54a22 Translated using Weblate (Dutch)
Currently translated at 100.0% (51 of 51 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/nl/
2021-05-25 07:17:01 +00:00
vabene1111
df53fdeb03 Update README.md 2021-05-24 16:54:31 +02:00
vabene1111
18333563f2 WIP fixing path issues on diffrent systems
relative paths do not appear to work on windows or at least the setup i have
2021-05-22 12:03:37 +02:00
vabene1111
286118093c Merge pull request #622 from smilerz/fix_url_import
updated url import and test due to updated recipe_scraper
2021-05-21 08:25:00 +02:00
smilerz
066ca27712 updated url import and test due to updated recipe_scraper 2021-05-20 11:57:05 -05:00
vabene1111
03c78f539d fixed ordering 2021-05-20 17:16:25 +02:00
vabene1111
be225d2b8c added ignore duplication option in import again 2021-05-20 17:03:47 +02:00
vabene1111
3340ef9ca4 small importer fix 2021-05-20 16:52:51 +02:00
vabene1111
fe3e611dd1 show recently added recipes in search 2021-05-20 16:45:41 +02:00
vabene1111
61d1528911 small improvements 2021-05-20 14:50:23 +02:00
vabene1111
88524b0411 Merge pull request #565 from smilerz/login_redirect
login redirect to intended page
2021-05-20 14:47:24 +02:00
vabene1111
e774845ade fixed and updates openapi shema 2021-05-20 11:43:31 +02:00
vabene1111
9a8049f71b fixed nextcloud importer ignoring certain recipes 2021-05-20 11:17:45 +02:00
vabene1111
d67bb9de25 fixed mealplan update non recipe entries 2021-05-19 13:12:12 +02:00
vabene1111
4b7896f7d1 auto open/close shopping list when checked 2021-05-19 12:58:34 +02:00
vabene1111
66ce1a88f6 Merge pull request #620 from vabene1111/dependabot/pip/jinja2-3.0.1
Bump jinja2 from 3.0.0 to 3.0.1
2021-05-19 08:49:10 +02:00
vabene1111
9ad42ae869 Merge pull request #619 from vabene1111/dependabot/pip/recipe-scrapers-13.2.5
Bump recipe-scrapers from 13.2.3 to 13.2.5
2021-05-19 08:49:00 +02:00
dependabot[bot]
1e72893c84 Bump jinja2 from 3.0.0 to 3.0.1
Bumps [jinja2](https://github.com/pallets/jinja) from 3.0.0 to 3.0.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.0...3.0.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-19 05:46:08 +00:00
dependabot[bot]
a21755cf81 Bump recipe-scrapers from 13.2.3 to 13.2.5
Bumps [recipe-scrapers](https://github.com/hhursev/recipe-scrapers) from 13.2.3 to 13.2.5.
- [Release notes](https://github.com/hhursev/recipe-scrapers/releases)
- [Commits](https://github.com/hhursev/recipe-scrapers/compare/13.2.3...13.2.5)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-19 05:46:02 +00:00
vabene1111
f0ba8eb788 recettetek importer 2021-05-18 18:47:53 +02:00
vabene1111
149020f930 fixed shopping list escaping issue 2021-05-18 18:20:41 +02:00
vabene1111
200adb2fcf fixed zero rating issue 2021-05-18 18:20:08 +02:00
vabene1111
bbd4d20210 uniqueness fixes 2021-05-18 18:20:08 +02:00
vabene1111
8aa11836a3 fixed webpack update and added documentation for new env variable 2021-05-18 18:20:08 +02:00
vabene1111
35338e2765 Merge pull request #578 from itsmegb/importer-recetteke
New Importer - RecetteTek
2021-05-18 18:20:02 +02:00
vabene1111
ddc91d910f Merge pull request #425 from tourn/database-url
Add support for DATABASE_URL env var
2021-05-18 16:30:54 +02:00
vabene1111
34085fc949 Merge pull request #616 from lbarnett83/patch-1
Update authentication.md
2021-05-18 10:10:21 +02:00
vabene1111
4ab56ef9f7 Merge pull request #618 from vabene1111/dependabot/pip/django-tables2-2.4.0
Bump django-tables2 from 2.3.4 to 2.4.0
2021-05-18 10:09:46 +02:00
vabene1111
47b873a2af Merge pull request #604 from sebimarkgraf/fix/rtl-input
Fix servings input field text direction
2021-05-18 10:07:33 +02:00
dependabot[bot]
34128ba3a3 Bump django-tables2 from 2.3.4 to 2.4.0
Bumps [django-tables2](https://github.com/jieter/django-tables2) from 2.3.4 to 2.4.0.
- [Release notes](https://github.com/jieter/django-tables2/releases)
- [Changelog](https://github.com/jieter/django-tables2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jieter/django-tables2/compare/v2.3.4...v2.4.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-18 07:14:00 +00:00
vabene1111
fae25b83fa Merge pull request #609 from vabene1111/dependabot/pip/recipe-scrapers-13.2.3
Bump recipe-scrapers from 13.2.1 to 13.2.3
2021-05-18 08:53:47 +02:00
vabene1111
a2322c18eb Merge pull request #610 from vabene1111/dependabot/pip/jinja2-3.0.0
Bump jinja2 from 2.11.3 to 3.0.0
2021-05-18 08:53:42 +02:00
vabene1111
f99793fc1a Merge branch 'develop' into dependabot/pip/jinja2-3.0.0 2021-05-18 08:53:38 +02:00
vabene1111
b10b811550 Merge pull request #612 from vabene1111/dependabot/pip/django-webpack-loader-1.0.0
Bump django-webpack-loader from 0.7.0 to 1.0.0
2021-05-18 08:53:13 +02:00
vabene1111
792ee43377 Merge pull request #614 from vabene1111/dependabot/pip/django-3.2.3
Bump django from 3.2.2 to 3.2.3
2021-05-18 08:53:08 +02:00
vabene1111
157beb3376 Merge pull request #617 from vabene1111/dependabot/pip/pytest-django-4.3.0
Bump pytest-django from 4.2.0 to 4.3.0
2021-05-18 08:52:57 +02:00
dependabot[bot]
1313c962fa Bump pytest-django from 4.2.0 to 4.3.0
Bumps [pytest-django](https://github.com/pytest-dev/pytest-django) from 4.2.0 to 4.3.0.
- [Release notes](https://github.com/pytest-dev/pytest-django/releases)
- [Changelog](https://github.com/pytest-dev/pytest-django/blob/master/docs/changelog.rst)
- [Commits](https://github.com/pytest-dev/pytest-django/compare/v4.2.0...v4.3.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-17 06:29:50 +00:00
Master_of_Pants
17c18c6d08 Update authentication.md
Added a semi-colon that while missing would cause a reverse proxy failure.
2021-05-16 23:47:11 -06:00
tourn
7650edfdc8 Merge remote-tracking branch 'upstream/develop' into database-url 2021-05-15 11:19:52 +02:00
tourn
46e48cd3a5 Parse DATABASE_URL with regex 2021-05-15 11:17:14 +02:00
dependabot[bot]
223f899e88 Bump django from 3.2.2 to 3.2.3
Bumps [django](https://github.com/django/django) from 3.2.2 to 3.2.3.
- [Release notes](https://github.com/django/django/releases)
- [Commits](https://github.com/django/django/compare/3.2.2...3.2.3)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-14 05:37:29 +00:00
vabene1111
d56c8c283c Merge pull request #613 from jdtimmerman/patch-1
Fix nginx_proxy docker-compose example
2021-05-13 13:54:51 +02:00
Joost Timmerman
67cd74860f Fix nginx_proxy docker-compose example
A copy/paste error probably?
2021-05-13 11:15:31 +02:00
dependabot[bot]
4df87bc7c7 Bump django-webpack-loader from 0.7.0 to 1.0.0
Bumps [django-webpack-loader](https://github.com/django-webpack/django-webpack-loader) from 0.7.0 to 1.0.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/0.7.0...1.0.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-13 05:50:47 +00:00
dependabot[bot]
16237866a1 Bump jinja2 from 2.11.3 to 3.0.0
Bumps [jinja2](https://github.com/pallets/jinja) from 2.11.3 to 3.0.0.
- [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/2.11.3...3.0.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-12 05:16:06 +00:00
dependabot[bot]
79cc8cc905 Bump recipe-scrapers from 13.2.1 to 13.2.3
Bumps [recipe-scrapers](https://github.com/hhursev/recipe-scrapers) from 13.2.1 to 13.2.3.
- [Release notes](https://github.com/hhursev/recipe-scrapers/releases)
- [Commits](https://github.com/hhursev/recipe-scrapers/compare/13.2.1...13.2.3)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-10 07:06:23 +00:00
vabene1111
3e2f3effeb Merge pull request #607 from vabene1111/dependabot/pip/django-3.2.2
Bump django from 3.2.1 to 3.2.2
2021-05-07 07:57:30 +02:00
dependabot[bot]
5623879919 Bump django from 3.2.1 to 3.2.2
Bumps [django](https://github.com/django/django) from 3.2.1 to 3.2.2.
- [Release notes](https://github.com/django/django/releases)
- [Commits](https://github.com/django/django/compare/3.2.1...3.2.2)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-07 05:53:59 +00:00
vabene1111
b1b1373d65 Merge pull request #606 from vabene1111/dependabot/pip/six-1.16.0
Bump six from 1.15.0 to 1.16.0
2021-05-06 07:57:34 +02:00
dependabot[bot]
3270f56744 Bump six from 1.15.0 to 1.16.0
Bumps [six](https://github.com/benjaminp/six) from 1.15.0 to 1.16.0.
- [Release notes](https://github.com/benjaminp/six/releases)
- [Changelog](https://github.com/benjaminp/six/blob/master/CHANGES)
- [Commits](https://github.com/benjaminp/six/compare/1.15.0...1.16.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-06 05:53:28 +00:00
Sebastian Markgraf
36df86c26c Change minimum of input field to be 0. 2021-05-05 18:11:30 +02:00
Sebastian Markgraf
532d6e2867 Fix rtl input field. 2021-05-05 17:09:31 +02:00
vabene1111
7c6d32456a Merge pull request #603 from vabene1111/dependabot/pip/pytest-6.2.4
Bump pytest from 6.2.3 to 6.2.4
2021-05-05 11:55:24 +02:00
vabene1111
6b8aa99b24 Merge pull request #602 from vabene1111/dependabot/pip/django-3.2.1
Bump django from 3.2 to 3.2.1
2021-05-05 11:55:14 +02:00
dependabot[bot]
65a6c08015 Bump pytest from 6.2.3 to 6.2.4
Bumps [pytest](https://github.com/pytest-dev/pytest) from 6.2.3 to 6.2.4.
- [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.3...6.2.4)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-05 05:52:46 +00:00
dependabot[bot]
22f4612d12 Bump django from 3.2 to 3.2.1
Bumps [django](https://github.com/django/django) from 3.2 to 3.2.1.
- [Release notes](https://github.com/django/django/releases)
- [Commits](https://github.com/django/django/compare/3.2...3.2.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-05 05:52:39 +00:00
Jesse
f65a5a9ad7 Translated using Weblate (Dutch)
Currently translated at 100.0% (50 of 50 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/nl/
2021-05-04 09:02:55 +00:00
Jesse
02b2d953ce Translated using Weblate (Dutch)
Currently translated at 100.0% (371 of 371 strings)

Translation: Tandoor/Recipes Backend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-backend/nl/
2021-05-04 09:02:54 +00:00
vabene1111
19cdf3a919 Merge pull request #600 from smilerz/develop
minor bug fix in bookmarklet
2021-05-03 19:00:03 +02:00
smilerz
6dfe737ec5 minor bug fix in bookmarklet 2021-05-03 08:40:09 -05:00
vabene1111
6110c75f59 Merge pull request #598 from smilerz/develop
updated to handle new behavior of recipe_scrapers
2021-05-03 07:49:37 +02:00
smilerz
984d5aae11 misc cleanup 2021-05-02 20:06:53 -05:00
smilerz
e345d2eb39 updated to handle new behavior of recipe_scrapers 2021-05-02 15:44:27 -05:00
vabene1111
90e1e69dac Merge pull request #515 from smilerz/bookmarklet
Bookmarklet
2021-05-02 17:41:46 +02:00
vabene1111
c4880bf5b0 Merge branch 'develop' into bookmarklet 2021-05-02 17:41:38 +02:00
vabene1111
3baa03396c tweaks to the importer 2021-05-02 17:33:52 +02:00
vabene1111
373df5d99f updated python in ci 2021-05-02 13:44:59 +02:00
vabene1111
d36274066a some fixed for the new importer + bumped python to 3.9 2021-05-02 13:42:14 +02:00
smilerz
59c33798b8 Fix after rebase 2021-05-01 16:30:33 -05:00
smilerz
d7afbc5745 truncate query params on url 2021-05-01 16:30:23 -05:00
smilerz
c62a88d032 include script name prefix in bookmarklet 2021-05-01 16:30:23 -05:00
smilerz
ed76f020c5 fix loading bookmarklet 2021-05-01 16:30:23 -05:00
smilerz
8b61d8c504 no_perm 2021-05-01 16:30:23 -05:00
smilerz
82abdd0144 removed unnecessary console message 2021-05-01 16:30:23 -05:00
smilerz
04d131f534 removed commented out settings 2021-05-01 16:30:22 -05:00
smilerz
8cc74f3dcd removed unused cors_headers 2021-05-01 16:30:22 -05:00
smilerz
bd46962b71 removed line breaks 2021-05-01 16:30:22 -05:00
smilerz
059987fd9f removed console.log() 2021-05-01 16:30:22 -05:00
smilerz
2ecc0ab680 Fix after rebase 2021-05-01 16:30:22 -05:00
smilerz
a69fb4922d updated model 2021-05-01 16:30:22 -05:00
smilerz
358ba5120d convert servings to number on import 2021-05-01 16:30:22 -05:00
smilerz
254267c2a7 update tests to handle url decoding 2021-05-01 16:30:22 -05:00
smilerz
a701437548 bring parser inline with json_import branch 2021-05-01 16:30:22 -05:00
smilerz
25f6adba1f unescape html document 2021-05-01 16:30:22 -05:00
smilerz
018fa0a62f updated bookmarklet to work with updated import process 2021-05-01 16:30:22 -05:00
smilerz
faf458e8ef Squashed commit of the following:
commit 707d862e01a7497a1f22879d314b865a35e0e85b
Author: smilerz <smilerz@gmail.com>
Date:   Wed Apr 14 10:35:00 2021 -0500

    works now

commit 3942a445ed4f2ccec57de25eacd86ea4e4dd6bdb
Author: smilerz <smilerz@gmail.com>
Date:   Wed Apr 14 10:25:24 2021 -0500

    updated serializer and api

commit 10dc746eb175c7f805a8a8ffa7ce49977a7ce97e
Author: smilerz <smilerz@gmail.com>
Date:   Wed Apr 14 10:20:19 2021 -0500

    fixed bookmarklet

commit 9779104902d3be0258c95cd2eeebcba0d5d48892
Merge: bb8262c 0cb3928
Author: smilerz <smilerz@gmail.com>
Date:   Wed Apr 14 09:56:27 2021 -0500

    Merge branch 'bookmarklet' into json_import

commit 0cb39284bb835ffc6cfee3e4306aadc4a64a25be
Author: smilerz <smilerz@gmail.com>
Date:   Wed Apr 14 09:42:53 2021 -0500

    retrieve bookmarklet ID from get

commit e89e0218de684d40b2e2bfb6ba833891206c828e
Author: smilerz <smilerz@gmail.com>
Date:   Wed Apr 14 09:29:33 2021 -0500

    Revert "fixed broken tab"

    This reverts commit ca0a1aede3cc6cb3912bc1fe30c0aa22e3f481a6.

commit bb8262ccabb93c56fbc18c407d5a0653b8b3ca79
Merge: b1e73aa 35a7f62
Author: smilerz <smilerz@gmail.com>
Date:   Sun Apr 11 20:35:57 2021 -0500

    Merge branch 'main_fork' into json_import
2021-05-01 16:30:22 -05:00
smilerz
2c5348fcb4 added missing bookmarklet 2021-05-01 16:30:22 -05:00
smilerz
2b16f966a2 Revert "bug fix url import"
This reverts commit 4ab8ca51e812d02911f4da801767612e52953a23.
2021-05-01 16:30:22 -05:00
smilerz
c2931137bb removed extra string normalization 2021-05-01 16:30:22 -05:00
smilerz
461d53671c updated migration 2021-05-01 16:30:22 -05:00
smilerz
3e4e55e9c5 updated recipe targets in tests to reflect html decoding 2021-05-01 16:30:22 -05:00
smilerz
11fa23f3da fixes #527 2021-05-01 16:30:22 -05:00
smilerz
6de128757f bug fix url import 2021-05-01 16:30:22 -05:00
smilerz
7c682ebab3 url import bug fixes 2021-05-01 16:30:22 -05:00
smilerz
ee165ef0f1 bug fix tests 2021-05-01 16:30:22 -05:00
smilerz
4bc4ce0d7c bug fix url import 2021-05-01 16:30:22 -05:00
smilerz
c50bd039ef recipe import tests 2021-05-01 16:30:22 -05:00
smilerz
5fff5b97da simplified url import 2021-05-01 16:30:21 -05:00
smilerz
2c27e06bfb add data for url_import test 2021-05-01 16:30:21 -05:00
smilerz
e4044016c3 added all ATK sites to custom scraper 2021-05-01 16:30:21 -05:00
smilerz
52df886372 added cooksillustrated custom scraper 2021-05-01 16:30:21 -05:00
smilerz
c7949edb18 ensure time is always a number 2021-05-01 16:30:21 -05:00
smilerz
342a261017 added ability to create custom scrapers 2021-05-01 16:30:21 -05:00
smilerz
e5984abd97 removed old json importer 2021-05-01 16:30:21 -05:00
smilerz
2ea3e4f8f3 updated import from source to use text scraper 2021-05-01 16:30:21 -05:00
smilerz
98b3b002f9 remove old html_import function 2021-05-01 16:30:21 -05:00
smilerz
d2a1a0ac32 wrapper for recipe_scrapers to parse text input 2021-05-01 16:30:21 -05:00
smilerz
2ceefdd9b0 fixed broken tab 2021-05-01 16:30:21 -05:00
smilerz
b22392726f delete bookmarklet on import 2021-05-01 16:30:21 -05:00
smilerz
b89fedd07f removed console message 2021-05-01 16:30:21 -05:00
smilerz
a263771383 fixed ingredient display on preview 2021-05-01 16:30:21 -05:00
smilerz
7cc757ac33 redirect to import url for processing 2021-05-01 16:30:21 -05:00
smilerz
6acbd6d308 added hack to fix scopes & CORS for bookmarklet 2021-05-01 16:30:21 -05:00
smilerz
30a357e27f added CORS middleware 2021-05-01 16:30:21 -05:00
smilerz
7bc3292301 added bookmarklet model and api 2021-05-01 16:30:21 -05:00
smilerz
7fb440a855 bookmarklet passing data to form 2021-05-01 16:30:21 -05:00
smilerz
0e27ddab74 added bookmarklet that doesn't work yet 2021-05-01 16:30:21 -05:00
smilerz
0a38049ce4 Squashed commit of the following:
commit 81a8734fac
Merge: abcef54 f67bb3c
Author: vabene1111 <vabene1111@users.noreply.github.com>
Date:   Sat Mar 20 22:41:13 2021 +0100

    Merge pull request #499 from sebimarkgraf/fix/432-ios-webclip-support

    Add iOS webclip icon support

commit abcef54e72
Merge: e15c92c 7527646
Author: vabene1111 <vabene1111@users.noreply.github.com>
Date:   Sat Mar 20 22:30:43 2021 +0100

    Merge pull request #498 from vabene1111/dependabot/pip/recipe-scrapers-12.2.1

    Bump recipe-scrapers from 12.2.0 to 12.2.1

commit e15c92cda5
Merge: 58fc269 45dba6f
Author: vabene1111 <vabene1111@users.noreply.github.com>
Date:   Sat Mar 20 22:26:06 2021 +0100

    Merge pull request #501 from smilerz/main_fork

    fix json direct import when wrapped in @graph

commit 45dba6fad2
Author: smilerz <smilerz@gmail.com>
Date:   Fri Mar 19 13:23:55 2021 -0500

    fix json direct import when wrapped in @graph

commit f67bb3cb98
Author: Sebastian Markgraf <Sebastian-Markgraf@t-online.de>
Date:   Fri Mar 19 15:49:12 2021 +0100

    Add generated icons from icongenerator.

commit 53b584da56
Author: Sebastian Markgraf <Sebastian-Markgraf@t-online.de>
Date:   Fri Mar 19 12:48:58 2021 +0100

    Fix errors in favicon SVG.

commit 7527646319
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Fri Mar 19 05:51:22 2021 +0000

    Bump recipe-scrapers from 12.2.0 to 12.2.1

    Bumps [recipe-scrapers](https://github.com/hhursev/recipe-scrapers) from 12.2.0 to 12.2.1.
    - [Release notes](https://github.com/hhursev/recipe-scrapers/releases)
    - [Commits](https://github.com/hhursev/recipe-scrapers/compare/12.2.0...12.2.1)

    Signed-off-by: dependabot[bot] <support@github.com>
2021-05-01 16:30:21 -05:00
smilerz
4aaecb4ada updated links to import recipes 2021-05-01 16:30:21 -05:00
smilerz
3f5e64fc4a added collapsable cards 2021-05-01 16:30:21 -05:00
smilerz
154527ef1b cosmetic cleanup 2021-05-01 16:30:21 -05:00
smilerz
788e253749 added image import 2021-05-01 16:30:21 -05:00
smilerz
7c8b489857 consolidated integration imports into url_import 2021-05-01 16:30:21 -05:00
smilerz
cdc25b480d staged app import tabs 2021-05-01 16:30:21 -05:00
smilerz
1568d86143 fixed missing space in keyword when adding recipe 2021-05-01 16:30:21 -05:00
smilerz
adeb360837 removed unused templates 2021-05-01 16:30:20 -05:00
smilerz
9cc6a1dc79 combined json import and source import 2021-05-01 16:30:20 -05:00
smilerz
6a13619bbd more fix from super ugly merge 2021-05-01 16:30:20 -05:00
smilerz
58e33ef31a more cleanup from ugly merge 2021-05-01 16:30:20 -05:00
smilerz
36841d74af fixed ugly merge 2021-05-01 16:30:20 -05:00
smilerz
8094c7d53a added drag and drop to ingredients 2021-05-01 16:30:20 -05:00
smilerz
71e02c0916 manually parse json 2021-05-01 16:30:20 -05:00
smilerz
25fb41baed update urls.py 2021-05-01 16:30:20 -05:00
smilerz
34ff484830 commit merge from Patralos/recipes 2021-05-01 16:30:20 -05:00
smilerz
91e36eb222 updated URL import page with tab interface 2021-05-01 16:30:20 -05:00
smilerz
55ba568f3c import raw json/html 2021-05-01 16:30:20 -05:00
smilerz
8f3f1c230c refactored json parser to create functions for each sub parser 2021-05-01 16:30:20 -05:00
Patrick Pirker
1690abaf47 replace common fractions with their concrete value (else parsing is not possible) 2021-05-01 16:30:20 -05:00
Patrick Pirker
7414033495 Allow recipes to be imported from json directly 2021-05-01 16:30:20 -05:00
vabene1111
d1b9d15816 recipe_scrapers deprectation fix 2021-05-01 22:56:00 +02:00
vabene1111
ff43492265 Merge pull request #505 from smilerz/json_import
Manually Import Recipe
2021-05-01 22:39:27 +02:00
vabene1111
3daebc4170 Merge branch 'develop' into json_import 2021-05-01 22:39:20 +02:00
vabene1111
67485c0ea3 Merge pull request #585 from TimPansino/develop
Fix crash on missing photos in paprika
2021-05-01 22:18:27 +02:00
vabene1111
aafbc497cc search view fixes/updates 2021-05-01 22:16:29 +02:00
vabene1111
0a99791021 Merge branch 'develop' of https://github.com/vabene1111/recipes into develop 2021-05-01 19:20:23 +02:00
vabene1111
7bc4ae9870 fixed paprika importer 2021-05-01 19:19:48 +02:00
vabene1111
84bd33f93e Merge pull request #590 from vabene1111/dependabot/pip/python-dotenv-0.17.1
Bump python-dotenv from 0.17.0 to 0.17.1
2021-05-01 17:26:26 +02:00
its_me_gb
7cd6a7c2a6 Import recipe keywords 2021-05-01 15:02:22 +01:00
Marcel Paluch
c661646f46 Translated using Weblate (German)
Currently translated at 100.0% (50 of 50 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/de/
2021-05-01 13:01:56 +00:00
Marcel Paluch
7a017899ee Translated using Weblate (German)
Currently translated at 99.7% (370 of 371 strings)

Translation: Tandoor/Recipes Backend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-backend/de/
2021-05-01 13:01:55 +00:00
its_me_gb
5ef5530392 Move the source url back into the step - inline with other importers 2021-04-30 08:40:00 +01:00
dependabot[bot]
689c447b6c Bump python-dotenv from 0.17.0 to 0.17.1
Bumps [python-dotenv](https://github.com/theskumar/python-dotenv) from 0.17.0 to 0.17.1.
- [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.17.0...v0.17.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-30 05:51:53 +00:00
vabene1111
239ba5f861 fixed meal plan notes and recipe links 2021-04-29 17:15:06 +02:00
Timothy Pansino
43c71af2af Fix crash on missing photos in paprika 2021-04-28 20:22:12 -07:00
its_me_gb
b9040cb3a4 parse the servings 2021-04-28 18:41:26 +01:00
its_me_gb
c710d42ccb Add the source url to description not step 2021-04-28 17:50:05 +01:00
its_me_gb
1bc5af1cab import local image, download if fails. 2021-04-28 13:47:51 +01:00
its_me_gb
23415f8a61 Initial importer created. 2021-04-28 13:47:51 +01:00
vabene1111
cc34496c00 added missing files last commit 2021-04-28 11:27:28 +02:00
vabene1111
be84e44e43 recipe view enhancements 2021-04-28 11:27:20 +02:00
vabene1111
ae3eb6cfe5 removed one more old bundle render 2021-04-28 09:46:52 +02:00
vabene1111
d06e6c0ab3 updated webpack loader and lots of javscript stuff 2021-04-28 09:41:06 +02:00
vabene1111
5ee718b578 added persistent search settings and tweaked view 2021-04-26 18:00:54 +02:00
vabene1111
dc27f39393 added recently viewed to new search 2021-04-26 17:21:14 +02:00
vabene1111
ec95f8032c fixed recipe url import issue on some pages without images 2021-04-26 16:41:48 +02:00
vabene1111
94b56ff742 Merge pull request #567 from vabene1111/dependabot/pip/django-cleanup-5.2.0
Bump django-cleanup from 5.1.0 to 5.2.0
2021-04-26 16:39:53 +02:00
vabene1111
fd1258f851 Merge pull request #569 from vabene1111/dependabot/npm_and_yarn/vue/ssri-6.0.2
Bump ssri from 6.0.1 to 6.0.2 in /vue
2021-04-26 16:39:40 +02:00
vabene1111
6f104d8aa4 Merge pull request #572 from vabene1111/dependabot/pip/recipe-scrapers-13.1.1
Bump recipe-scrapers from 12.2.2 to 13.1.1
2021-04-26 16:39:25 +02:00
Jesse
d35f8a0ccd Translated using Weblate (Dutch)
Currently translated at 100.0% (46 of 46 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/nl/
2021-04-22 18:29:10 +00:00
Jesse
f2d761f7d9 Translated using Weblate (Dutch)
Currently translated at 100.0% (371 of 371 strings)

Translation: Tandoor/Recipes Backend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-backend/nl/
2021-04-22 18:29:10 +00:00
dependabot[bot]
d9a92fac95 Bump recipe-scrapers from 12.2.2 to 13.1.1
Bumps [recipe-scrapers](https://github.com/hhursev/recipe-scrapers) from 12.2.2 to 13.1.1.
- [Release notes](https://github.com/hhursev/recipe-scrapers/releases)
- [Commits](https://github.com/hhursev/recipe-scrapers/compare/12.2.2...13.1.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-21 05:52:07 +00:00
smilerz
a1572a4809 changed keyword to get_or_create 2021-04-20 09:15:03 -05:00
smilerz
2b5dceee7c WIP 2021-04-20 08:09:42 -05:00
dependabot[bot]
62e9a7f29c Bump ssri from 6.0.1 to 6.0.2 in /vue
Bumps [ssri](https://github.com/npm/ssri) from 6.0.1 to 6.0.2.
- [Release notes](https://github.com/npm/ssri/releases)
- [Changelog](https://github.com/npm/ssri/blob/v6.0.2/CHANGELOG.md)
- [Commits](https://github.com/npm/ssri/compare/v6.0.1...v6.0.2)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-20 02:40:53 +00:00
smilerz
66bb5b4328 strip spaces from food, keywords and units 2021-04-19 17:35:53 -05:00
smilerz
0f4cd4b17c fix ATK scraper 2021-04-19 14:37:26 -05:00
smilerz
ae3835b541 update ATK scraper 2021-04-19 14:31:48 -05:00
dependabot[bot]
28fedfda1f Bump django-cleanup from 5.1.0 to 5.2.0
Bumps [django-cleanup](https://github.com/un1t/django-cleanup) from 5.1.0 to 5.2.0.
- [Release notes](https://github.com/un1t/django-cleanup/releases)
- [Changelog](https://github.com/un1t/django-cleanup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/un1t/django-cleanup/compare/5.1.0...5.2.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-19 07:30:31 +00:00
vabene1111
92c65ec1e8 fixed test meal plan 2021-04-18 21:21:41 +02:00
vabene1111
a376c3a5b6 meal plan random fix 2021-04-18 17:55:48 +02:00
vabene1111
058d705170 meal plan in search 2021-04-18 17:19:11 +02:00
vabene1111
4ad5d6ef2f fixed test + added api doc for new search 2021-04-18 15:01:39 +02:00
vabene1111
e676b4bac3 added api pagination for recipes 2021-04-18 14:05:19 +02:00
vabene1111
04488741c4 adv search mobile styling 2021-04-18 11:11:19 +02:00
vabene1111
99004ad34b new search and setting 2021-04-18 11:03:15 +02:00
vabene1111
f78f7dfc14 search ui improvements and filter 2021-04-18 02:55:50 +02:00
smilerz
49fb1e7183 login redirect to intended page 2021-04-17 18:34:56 -05:00
smilerz
7930c2417c update ATK scrape to handle empty headnote 2021-04-17 17:12:43 -05:00
vabene1111
880db58d38 v2 search filtering 2021-04-17 21:28:29 +02:00
smilerz
2f27413c0a parse multiple ingredientGroups
previous version assumed only a single item in a list - this loops through each item
2021-04-17 14:12:24 -05:00
smilerz
5869a8ad1b fixes to pass tests 2021-04-17 13:43:34 -05:00
smilerz
0640a265fc added test for spruce eats 2021-04-17 13:42:56 -05:00
smilerz
d449fc8fd8 updated normalization to skip removing line breaks 2021-04-17 12:49:42 -05:00
smilerz
b9ee77709b updated ATK scraper to include header notes in instructions 2021-04-17 12:49:06 -05:00
smilerz
f594ba4c69 enable import button after error 2021-04-17 11:12:22 -05:00
vabene1111
d1d65d878c v2 search progress 2021-04-17 14:11:10 +02:00
vabene1111
3194a7580d basics of v2 search working 2021-04-17 12:57:02 +02:00
smilerz
ba061df1b6 catch attribute error on cooktime 2021-04-16 17:30:59 -05:00
smilerz
7cc515bcdf fix manual url import 2021-04-16 17:08:25 -05:00
smilerz
724748d38a corrected api import workflow 2021-04-16 14:09:10 -05:00
smilerz
b2c1c6e301 restored missing manual url scrape 2021-04-16 11:26:26 -05:00
smilerz
987be4b04d Fix after rebase 2021-04-16 09:02:27 -05:00
smilerz
ca84da68c4 catch attibute error when scrape missing schema 2021-04-16 09:02:04 -05:00
smilerz
d75e39fbcd set persistent connections to db 2021-04-16 09:02:04 -05:00
smilerz
eb2593aacd handle text in cook times during import 2021-04-16 09:02:04 -05:00
smilerz
496e04cfc8 convert servings to number on import 2021-04-16 09:02:04 -05:00
smilerz
d814d13d54 custom scraper fails safe 2021-04-16 09:02:03 -05:00
smilerz
d0cedaf7a1 added name parser 2021-04-16 09:02:03 -05:00
smilerz
01f504f7b1 updated tests to handle html decoding 2021-04-16 09:02:03 -05:00
smilerz
c716346f1f flake 2021-04-16 09:02:03 -05:00
smilerz
fef5236931 decode url strings in text_parser 2021-04-16 09:02:03 -05:00
smilerz
b115c37eb8 catch error on scrape.image() 2021-04-16 09:02:03 -05:00
smilerz
1e17f3703a trap error on scrape.title() 2021-04-16 09:02:03 -05:00
smilerz
468b986314 updated tests 2021-04-16 09:02:03 -05:00
smilerz
a531d135b5 remove html tags from description 2021-04-16 09:02:03 -05:00
smilerz
7524609cd0 retrieve bookmarklet ID from get 2021-04-16 09:02:03 -05:00
smilerz
a28f8e65d5 Revert "fixed broken tab"
This reverts commit ca0a1aede3cc6cb3912bc1fe30c0aa22e3f481a6.
2021-04-16 09:02:03 -05:00
smilerz
d193637091 added missing bookmarklet 2021-04-16 09:02:03 -05:00
smilerz
0953af05fc Revert "bug fix url import"
This reverts commit 4ab8ca51e812d02911f4da801767612e52953a23.
2021-04-16 09:02:03 -05:00
smilerz
19e8e5cb5b removed extra string normalization 2021-04-16 09:02:03 -05:00
smilerz
43c808380d updated migration 2021-04-16 09:02:03 -05:00
smilerz
7ab8b84044 updated recipe targets in tests to reflect html decoding 2021-04-16 09:02:03 -05:00
smilerz
d739fe6752 fixes #527 2021-04-16 09:02:03 -05:00
smilerz
a84c41e29f bug fix url import 2021-04-16 09:02:03 -05:00
smilerz
393aba1f31 url import bug fixes 2021-04-16 09:02:03 -05:00
smilerz
436a070730 bug fix tests 2021-04-16 09:02:03 -05:00
smilerz
2fe6788ce5 bug fix url import 2021-04-16 09:02:03 -05:00
smilerz
747d146389 recipe import tests 2021-04-16 09:02:03 -05:00
smilerz
efe4c4043d simplified url import 2021-04-16 09:02:03 -05:00
smilerz
c6739ba8e0 add data for url_import test 2021-04-16 09:02:02 -05:00
smilerz
50140db668 added all ATK sites to custom scraper 2021-04-16 09:02:02 -05:00
smilerz
028b2dfb22 added cooksillustrated custom scraper 2021-04-16 09:02:02 -05:00
smilerz
ec6a10ca0a ensure time is always a number 2021-04-16 09:02:02 -05:00
smilerz
3cf949bf8d added ability to create custom scrapers 2021-04-16 09:02:02 -05:00
smilerz
0a62225797 removed old json importer 2021-04-16 09:02:02 -05:00
smilerz
a54f4e1367 updated import from source to use text scraper 2021-04-16 09:02:02 -05:00
smilerz
bf3c30a8fb remove old html_import function 2021-04-16 09:02:02 -05:00
smilerz
f811f5996e wrapper for recipe_scrapers to parse text input 2021-04-16 09:02:02 -05:00
smilerz
a3490240f4 fixed broken tab 2021-04-16 09:02:02 -05:00
smilerz
b26aea96f4 delete bookmarklet on import 2021-04-16 09:02:02 -05:00
smilerz
4d4af5fdf2 removed console message 2021-04-16 09:02:02 -05:00
smilerz
3da74505d6 fixed ingredient display on preview 2021-04-16 09:02:02 -05:00
smilerz
c8a4861df8 redirect to import url for processing 2021-04-16 09:02:02 -05:00
smilerz
5e27cd606e added hack to fix scopes & CORS for bookmarklet 2021-04-16 09:02:02 -05:00
smilerz
a341fd8ebe added CORS middleware 2021-04-16 09:02:02 -05:00
smilerz
9a62b6e4e7 added bookmarklet model and api 2021-04-16 09:02:02 -05:00
smilerz
f80c44bca3 bookmarklet passing data to form 2021-04-16 09:02:02 -05:00
smilerz
09d2e9f831 added bookmarklet that doesn't work yet 2021-04-16 09:02:02 -05:00
smilerz
4d5a9e446f Squashed commit of the following:
commit 81a8734fac
Merge: abcef54 f67bb3c
Author: vabene1111 <vabene1111@users.noreply.github.com>
Date:   Sat Mar 20 22:41:13 2021 +0100

    Merge pull request #499 from sebimarkgraf/fix/432-ios-webclip-support

    Add iOS webclip icon support

commit abcef54e72
Merge: e15c92c 7527646
Author: vabene1111 <vabene1111@users.noreply.github.com>
Date:   Sat Mar 20 22:30:43 2021 +0100

    Merge pull request #498 from vabene1111/dependabot/pip/recipe-scrapers-12.2.1

    Bump recipe-scrapers from 12.2.0 to 12.2.1

commit e15c92cda5
Merge: 58fc269 45dba6f
Author: vabene1111 <vabene1111@users.noreply.github.com>
Date:   Sat Mar 20 22:26:06 2021 +0100

    Merge pull request #501 from smilerz/main_fork

    fix json direct import when wrapped in @graph

commit 45dba6fad2
Author: smilerz <smilerz@gmail.com>
Date:   Fri Mar 19 13:23:55 2021 -0500

    fix json direct import when wrapped in @graph

commit f67bb3cb98
Author: Sebastian Markgraf <Sebastian-Markgraf@t-online.de>
Date:   Fri Mar 19 15:49:12 2021 +0100

    Add generated icons from icongenerator.

commit 53b584da56
Author: Sebastian Markgraf <Sebastian-Markgraf@t-online.de>
Date:   Fri Mar 19 12:48:58 2021 +0100

    Fix errors in favicon SVG.

commit 7527646319
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Fri Mar 19 05:51:22 2021 +0000

    Bump recipe-scrapers from 12.2.0 to 12.2.1

    Bumps [recipe-scrapers](https://github.com/hhursev/recipe-scrapers) from 12.2.0 to 12.2.1.
    - [Release notes](https://github.com/hhursev/recipe-scrapers/releases)
    - [Commits](https://github.com/hhursev/recipe-scrapers/compare/12.2.0...12.2.1)

    Signed-off-by: dependabot[bot] <support@github.com>
2021-04-16 09:02:02 -05:00
smilerz
6a2c27749f updated links to import recipes 2021-04-16 09:02:02 -05:00
smilerz
de60e12073 added collapsable cards 2021-04-16 09:02:02 -05:00
smilerz
1188ed9227 cosmetic cleanup 2021-04-16 09:02:02 -05:00
smilerz
cb708e7e47 added image import 2021-04-16 09:02:02 -05:00
smilerz
215eadb4a0 consolidated integration imports into url_import 2021-04-16 09:02:02 -05:00
smilerz
4ffc54f720 staged app import tabs 2021-04-16 09:02:02 -05:00
smilerz
21f6c7a21f fixed missing space in keyword when adding recipe 2021-04-16 09:02:02 -05:00
smilerz
ce7c6939d2 removed unused templates 2021-04-16 09:02:02 -05:00
smilerz
40a2f7ff90 combined json import and source import 2021-04-16 09:02:01 -05:00
smilerz
4015517c0a more fix from super ugly merge 2021-04-16 09:02:01 -05:00
smilerz
7c8d41753c more cleanup from ugly merge 2021-04-16 09:02:01 -05:00
smilerz
90670613c5 fixed ugly merge 2021-04-16 09:02:01 -05:00
smilerz
647c1678f1 added drag and drop to ingredients 2021-04-16 09:02:01 -05:00
smilerz
44dee16e0a manually parse json 2021-04-16 09:02:01 -05:00
smilerz
f8fedcac82 update urls.py 2021-04-16 09:02:01 -05:00
smilerz
3a48d0e580 commit merge from Patralos/recipes 2021-04-16 09:02:01 -05:00
smilerz
9930789aa8 updated URL import page with tab interface 2021-04-16 09:02:01 -05:00
smilerz
83fce6461a import raw json/html 2021-04-16 09:02:01 -05:00
smilerz
f0d37244b6 refactored json parser to create functions for each sub parser 2021-04-16 09:02:01 -05:00
Patrick Pirker
386834f409 Allow recipes to be imported from json directly 2021-04-16 09:02:01 -05:00
Jesse
17c5084bc0 Translated using Weblate (Dutch)
Currently translated at 100.0% (38 of 38 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/nl/
2021-04-16 12:22:10 +00:00
vabene1111
e38f50c352 v2 search basic display of recipes 2021-04-15 22:49:30 +02:00
vabene1111
c1abff8da0 v2 search basics 2021-04-15 22:12:31 +02:00
vabene1111
625c04257e added a small faq to the docs 2021-04-15 21:15:26 +02:00
vabene1111
5521c29d43 Merge pull request #550 from comradekingu/patch-1
Spelling: Log out
2021-04-15 18:45:17 +02:00
vabene1111
dc3a530928 Merge pull request #555 from smilerz/deprecation-fixes
Deprecation fixes
2021-04-15 18:43:40 +02:00
vabene1111
48f63b4d9f Merge pull request #552 from smilerz/main_fork
fixed tests to work in batch mode
2021-04-15 18:43:34 +02:00
vabene1111
1604ae51de Merge pull request #553 from vabene1111/dependabot/pip/pytest-django-4.2.0
Bump pytest-django from 4.1.0 to 4.2.0
2021-04-15 18:43:21 +02:00
vabene1111
a1502bffd1 translations doc 2021-04-15 18:43:02 +02:00
Jesse
756e5ec668 Added translation using Weblate (Dutch) 2021-04-15 11:23:53 +00:00
Olle Mineur
b9cf0a7136 Translated using Weblate (Swedish)
Currently translated at 97.3% (37 of 38 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/sv/
2021-04-12 20:22:10 +00:00
Olle Mineur
6bf72c4043 Translated using Weblate (Swedish)
Currently translated at 51.2% (190 of 371 strings)

Translation: Tandoor/Recipes Backend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-backend/sv/
2021-04-12 20:22:10 +00:00
vabene1111
f2f8342b49 Translated using Weblate (German)
Currently translated at 55.2% (21 of 38 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/de/
2021-04-12 20:22:09 +00:00
Jesse
7d82393789 Translated using Weblate (Dutch)
Currently translated at 100.0% (371 of 371 strings)

Translation: Tandoor/Recipes Backend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-backend/nl/
2021-04-12 20:22:08 +00:00
Hrachya Kocharyan
2254d6f072 Translated using Weblate (Armenian)
Currently translated at 100.0% (362 of 362 strings)

Translation: Tandoor/Recipes Backend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-backend/hy/
2021-04-12 20:22:08 +00:00
smilerz
8d02cad7d9 resolved deprecation warnings introduced in django 3.2 2021-04-12 14:12:04 -05:00
dependabot[bot]
5c12d00f49 Bump pytest-django from 4.1.0 to 4.2.0
Bumps [pytest-django](https://github.com/pytest-dev/pytest-django) from 4.1.0 to 4.2.0.
- [Release notes](https://github.com/pytest-dev/pytest-django/releases)
- [Changelog](https://github.com/pytest-dev/pytest-django/blob/master/docs/changelog.rst)
- [Commits](https://github.com/pytest-dev/pytest-django/compare/v4.1.0...v4.2.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-12 07:09:32 +00:00
smilerz
b37fc4e24f fixed tests to work in batch mode 2021-04-11 22:05:27 -05:00
vabene1111
35a7f62837 Added translation using Weblate (Swedish) 2021-04-11 19:15:56 +00:00
vabene1111
ffc1c5a99c Added translation using Weblate (Swedish) 2021-04-11 19:15:43 +00:00
vabene1111
fc2a60a4ba fixed postgres search 2021-04-11 21:02:47 +02:00
vabene1111
fb0f424d82 migrated new vue component system to vue native translations 2021-04-11 18:08:29 +02:00
vabene1111
ffb5291f4b code ql correction 2021-04-11 17:43:15 +02:00
vabene1111
77ba482b79 possible fixed code ql 2021-04-11 17:34:02 +02:00
vabene1111
abb0be69d8 Translated using Weblate (German)
Currently translated at 100.0% (5 of 5 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/de/
2021-04-11 15:29:28 +00:00
Allan Nordhøy
7bb23e8362 Translated using Weblate (Norwegian Bokmål)
Currently translated at 24.7% (92 of 371 strings)

Translation: Tandoor/Recipes Backend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-backend/nb_NO/
2021-04-11 15:23:07 +00:00
Oliver Cervera
cbb659da41 Translated using Weblate (Italian)
Currently translated at 100.0% (371 of 371 strings)

Translation: Tandoor/Recipes Backend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-backend/it/
2021-04-11 15:23:07 +00:00
vabene1111
52b0382243 Translated using Weblate (German)
Currently translated at 100.0% (371 of 371 strings)

Translation: Tandoor/Recipes Backend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-backend/de/
2021-04-11 15:23:07 +00:00
vabene1111
3371dc949a Translated using Weblate (German)
Currently translated at 100.0% (5 of 5 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/de/
2021-04-11 15:22:58 +00:00
vabene1111
49f026f2bd Added translation using Weblate (German) 2021-04-11 15:21:18 +00:00
vabene1111
cce373a522 started migrating frontend localization 2021-04-11 17:03:09 +02:00
Allan Nordhøy
b4b3e659de Spelling: Log out 2021-04-11 16:27:16 +02:00
Allan Nordhøy
f81500ec99 Added translation using Weblate (Norwegian Bokmål) 2021-04-11 14:18:57 +00:00
vabene1111
ecba13e97f added more docs 2021-04-11 16:09:04 +02:00
vabene1111
191a6c0d9b updated translation docs 2021-04-11 16:05:01 +02:00
vabene1111
52ba2be586 Translated using Weblate (German)
Currently translated at 99.4% (369 of 371 strings)

Translation: Tandoor/Recipes Backend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-backend/de/
2021-04-11 13:40:05 +00:00
vabene1111
36129b29b4 made and compiled messages 2021-04-11 15:09:54 +02:00
vabene1111
99e3690a42 Merge pull request #535 from vabene1111/translations_cookbook-locale-en-lc-messages-django-po--develop_hy
Translate '/cookbook/locale/en/LC_MESSAGES/django.po' in 'hy' [manual sync]
2021-04-11 14:09:17 +02:00
vabene1111
c780f81dd8 Merge pull request #536 from vabene1111/translations_cookbook-locale-en-lc-messages-django-po--develop_ca
Translate '/cookbook/locale/en/LC_MESSAGES/django.po' in 'ca' [manual sync]
2021-04-11 14:09:13 +02:00
vabene1111
27f5e85e11 Merge pull request #537 from vabene1111/translations_cookbook-locale-en-lc-messages-django-po--develop_cs
Translate '/cookbook/locale/en/LC_MESSAGES/django.po' in 'cs' [manual sync]
2021-04-11 14:09:09 +02:00
vabene1111
e6d9ffbb9c Merge pull request #538 from vabene1111/translations_cookbook-locale-en-lc-messages-django-po--develop_nl
Translate '/cookbook/locale/en/LC_MESSAGES/django.po' in 'nl' [manual sync]
2021-04-11 14:09:04 +02:00
vabene1111
3b188c3c55 Merge pull request #539 from vabene1111/translations_cookbook-locale-en-lc-messages-django-po--develop_fr
Translate '/cookbook/locale/en/LC_MESSAGES/django.po' in 'fr' [manual sync]
2021-04-11 14:09:00 +02:00
vabene1111
161e70dc9c Merge pull request #540 from vabene1111/translations_cookbook-locale-en-lc-messages-django-po--develop_de
Translate '/cookbook/locale/en/LC_MESSAGES/django.po' in 'de' [manual sync]
2021-04-11 14:08:55 +02:00
vabene1111
1f80df262b Merge pull request #541 from vabene1111/translations_cookbook-locale-en-lc-messages-django-po--develop_hu_HU
Translate '/cookbook/locale/en/LC_MESSAGES/django.po' in 'hu_HU' [manual sync]
2021-04-11 14:08:51 +02:00
vabene1111
9928675f48 Merge pull request #542 from vabene1111/translations_cookbook-locale-en-lc-messages-django-po--develop_it
Translate '/cookbook/locale/en/LC_MESSAGES/django.po' in 'it' [manual sync]
2021-04-11 14:08:47 +02:00
vabene1111
3d925b29c2 Merge pull request #543 from vabene1111/translations_cookbook-locale-en-lc-messages-django-po--develop_lv
Translate '/cookbook/locale/en/LC_MESSAGES/django.po' in 'lv' [manual sync]
2021-04-11 14:08:43 +02:00
vabene1111
4825317a58 Merge pull request #544 from vabene1111/translations_cookbook-locale-en-lc-messages-django-po--develop_pl
Translate '/cookbook/locale/en/LC_MESSAGES/django.po' in 'pl' [manual sync]
2021-04-11 14:08:39 +02:00
vabene1111
9a5408e996 Merge pull request #545 from vabene1111/translations_cookbook-locale-en-lc-messages-django-po--develop_pt
Translate '/cookbook/locale/en/LC_MESSAGES/django.po' in 'pt' [manual sync]
2021-04-11 14:08:34 +02:00
vabene1111
f13c1a2605 Merge pull request #546 from vabene1111/translations_cookbook-locale-en-lc-messages-django-po--develop_es
Translate '/cookbook/locale/en/LC_MESSAGES/django.po' in 'es' [manual sync]
2021-04-11 14:08:30 +02:00
vabene1111
bc8aadbe4e Merge pull request #547 from vabene1111/translations_cookbook-locale-en-lc-messages-django-po--develop_tr
Translate '/cookbook/locale/en/LC_MESSAGES/django.po' in 'tr' [manual sync]
2021-04-11 14:08:27 +02:00
vabene1111
e60843b54c Merge pull request #548 from vabene1111/translations_cookbook-locale-en-lc-messages-django-po--develop_vi
Translate '/cookbook/locale/en/LC_MESSAGES/django.po' in 'vi' [manual sync]
2021-04-11 14:08:23 +02:00
transifex-integration[bot]
46dce472db Apply translations in vi
at least 1% translated for the source file '/cookbook/locale/en/LC_MESSAGES/django.po'
on the 'vi' language.

 Manual sync of partially translated files: untranslated content is included with an empty translation or source language content depending on file format
2021-04-11 11:51:07 +00:00
transifex-integration[bot]
556ca1bcb1 Apply translations in tr
at least 1% translated for the source file '/cookbook/locale/en/LC_MESSAGES/django.po'
on the 'tr' language.

 Manual sync of partially translated files: untranslated content is included with an empty translation or source language content depending on file format
2021-04-11 11:51:03 +00:00
transifex-integration[bot]
d9b2fcaa87 Apply translations in es
at least 1% translated for the source file '/cookbook/locale/en/LC_MESSAGES/django.po'
on the 'es' language.

 Manual sync of partially translated files: untranslated content is included with an empty translation or source language content depending on file format
2021-04-11 11:50:59 +00:00
transifex-integration[bot]
3e950602a7 Apply translations in pt
at least 1% translated for the source file '/cookbook/locale/en/LC_MESSAGES/django.po'
on the 'pt' language.

 Manual sync of partially translated files: untranslated content is included with an empty translation or source language content depending on file format
2021-04-11 11:50:55 +00:00
transifex-integration[bot]
1fe0757f6c Apply translations in pl
at least 1% translated for the source file '/cookbook/locale/en/LC_MESSAGES/django.po'
on the 'pl' language.

 Manual sync of partially translated files: untranslated content is included with an empty translation or source language content depending on file format
2021-04-11 11:50:51 +00:00
transifex-integration[bot]
b6cf1cf5e6 Apply translations in lv
at least 1% translated for the source file '/cookbook/locale/en/LC_MESSAGES/django.po'
on the 'lv' language.

 Manual sync of partially translated files: untranslated content is included with an empty translation or source language content depending on file format
2021-04-11 11:50:47 +00:00
transifex-integration[bot]
ca7d487789 Apply translations in it
at least 1% translated for the source file '/cookbook/locale/en/LC_MESSAGES/django.po'
on the 'it' language.

 Manual sync of partially translated files: untranslated content is included with an empty translation or source language content depending on file format
2021-04-11 11:50:43 +00:00
transifex-integration[bot]
cb44136b2e Apply translations in hu_HU
at least 1% translated for the source file '/cookbook/locale/en/LC_MESSAGES/django.po'
on the 'hu_HU' language.

 Manual sync of partially translated files: untranslated content is included with an empty translation or source language content depending on file format
2021-04-11 11:50:38 +00:00
transifex-integration[bot]
c92331a79c Apply translations in de
at least 1% translated for the source file '/cookbook/locale/en/LC_MESSAGES/django.po'
on the 'de' language.

 Manual sync of partially translated files: untranslated content is included with an empty translation or source language content depending on file format
2021-04-11 11:50:35 +00:00
transifex-integration[bot]
82e7118757 Apply translations in fr
at least 1% translated for the source file '/cookbook/locale/en/LC_MESSAGES/django.po'
on the 'fr' language.

 Manual sync of partially translated files: untranslated content is included with an empty translation or source language content depending on file format
2021-04-11 11:50:30 +00:00
transifex-integration[bot]
6d9817183e Apply translations in nl
at least 1% translated for the source file '/cookbook/locale/en/LC_MESSAGES/django.po'
on the 'nl' language.

 Manual sync of partially translated files: untranslated content is included with an empty translation or source language content depending on file format
2021-04-11 11:50:25 +00:00
transifex-integration[bot]
0e05d5b18d Apply translations in cs
at least 1% translated for the source file '/cookbook/locale/en/LC_MESSAGES/django.po'
on the 'cs' language.

 Manual sync of partially translated files: untranslated content is included with an empty translation or source language content depending on file format
2021-04-11 11:50:17 +00:00
transifex-integration[bot]
da1d88314b Apply translations in ca
at least 1% translated for the source file '/cookbook/locale/en/LC_MESSAGES/django.po'
on the 'ca' language.

 Manual sync of partially translated files: untranslated content is included with an empty translation or source language content depending on file format
2021-04-11 11:50:13 +00:00
transifex-integration[bot]
c46f22d71e Apply translations in hy
at least 1% translated for the source file '/cookbook/locale/en/LC_MESSAGES/django.po'
on the 'hy' language.

 Manual sync of partially translated files: untranslated content is included with an empty translation or source language content depending on file format
2021-04-11 11:50:09 +00:00
vabene1111
f21de5eddc fixed public share links 2021-04-10 14:36:56 +02:00
vabene1111
e88fb88d8a Merge pull request #534 from smilerz/backend_filter_fix
fix backend detection
2021-04-10 13:59:45 +02:00
smilerz
6eb14daf4d fix backend detection 2021-04-09 13:13:10 -05:00
vabene1111
fad40dab6c client api generation 2021-04-08 22:05:05 +02:00
vabene1111
015e01afb9 cheftap importer improvement 2021-04-08 21:01:07 +02:00
vabene1111
2acdd16d9e Merge pull request #531 from vabene1111/dependabot/pip/django-3.2
Bump django from 3.1.7 to 3.2
2021-04-07 17:50:31 +02:00
dependabot[bot]
d15162337f Bump django from 3.1.7 to 3.2
Bumps [django](https://github.com/django/django) from 3.1.7 to 3.2.
- [Release notes](https://github.com/django/django/releases)
- [Commits](https://github.com/django/django/compare/3.1.7...3.2)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-07 06:00:38 +00:00
vabene1111
0862c0f0bc add migration to automatically assign group to existing superusers 2021-04-06 18:10:22 +02:00
vabene1111
a811d4a55c Merge branch 'beta' into develop 2021-04-05 18:21:55 +02:00
vabene1111
01a53ad8ec paprika improvements and importer fixes 2021-04-05 17:55:06 +02:00
vabene1111
c7e20716f5 more testing deployments 2021-04-05 17:16:26 +02:00
vabene1111
7adc4ad50a testing with newer base image 2021-04-05 16:01:49 +02:00
vabene1111
61ded5094f testing with manual wheel install 2021-04-05 15:45:21 +02:00
vabene1111
7aff5dc44a set cryptography manually 2021-04-05 15:24:00 +02:00
vabene1111
b5e5ff9bf8 testing docker build 2021-04-05 15:03:29 +02:00
vabene1111
a8434ce745 Merge pull request #520 from vabene1111/dependabot/pip/python-dotenv-0.17.0
Bump python-dotenv from 0.16.0 to 0.17.0
2021-04-05 12:16:30 +02:00
vabene1111
cf926295cf Merge pull request #521 from vabene1111/dependabot/pip/pytest-6.2.3
Bump pytest from 6.2.2 to 6.2.3
2021-04-05 12:16:23 +02:00
dependabot[bot]
dbd7ae4adc Bump pytest from 6.2.2 to 6.2.3
Bumps [pytest](https://github.com/pytest-dev/pytest) from 6.2.2 to 6.2.3.
- [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.2...6.2.3)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-05 06:57:49 +00:00
dependabot[bot]
ba20fa1ff5 Bump python-dotenv from 0.16.0 to 0.17.0
Bumps [python-dotenv](https://github.com/theskumar/python-dotenv) from 0.16.0 to 0.17.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.16.0...v0.17.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-05 06:57:35 +00:00
vabene1111
a5b92f5672 fixed template render issues 2021-04-04 11:16:48 +02:00
vabene1111
ed412d11b7 Merge pull request #516 from vabene1111/dependabot/pip/pillow-8.2.0
Bump pillow from 8.1.2 to 8.2.0
2021-04-02 13:07:48 +02:00
dependabot[bot]
b36d0620e0 Bump pillow from 8.1.2 to 8.2.0
Bumps [pillow](https://github.com/python-pillow/Pillow) from 8.1.2 to 8.2.0.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/master/CHANGES.rst)
- [Commits](https://github.com/python-pillow/Pillow/compare/8.1.2...8.2.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-02 06:02:28 +00:00
vabene1111
d16d77f640 Merge pull request #511 from vabene1111/dependabot/pip/recipe-scrapers-12.2.2
Bump recipe-scrapers from 12.2.1 to 12.2.2
2021-03-29 20:49:55 +02:00
vabene1111
d72f90b90e Merge pull request #512 from vabene1111/dependabot/pip/djangorestframework-3.12.4
Bump djangorestframework from 3.12.3 to 3.12.4
2021-03-29 20:49:49 +02:00
vabene1111
9c78bcd662 Merge pull request #513 from vabene1111/dependabot/pip/python-dotenv-0.16.0
Bump python-dotenv from 0.15.0 to 0.16.0
2021-03-29 20:49:45 +02:00
vabene1111
b8c8fc3b58 Merge pull request #514 from vabene1111/dependabot/pip/gunicorn-20.1.0
Bump gunicorn from 20.0.4 to 20.1.0
2021-03-29 20:49:39 +02:00
dependabot[bot]
e1110000ab Bump gunicorn from 20.0.4 to 20.1.0
Bumps [gunicorn](https://github.com/benoitc/gunicorn) from 20.0.4 to 20.1.0.
- [Release notes](https://github.com/benoitc/gunicorn/releases)
- [Commits](https://github.com/benoitc/gunicorn/compare/20.0.4...20.1.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-29 06:54:27 +00:00
dependabot[bot]
00194f68bf Bump python-dotenv from 0.15.0 to 0.16.0
Bumps [python-dotenv](https://github.com/theskumar/python-dotenv) from 0.15.0 to 0.16.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.15.0...v0.16.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-29 06:54:20 +00:00
dependabot[bot]
4f4c324c30 Bump djangorestframework from 3.12.3 to 3.12.4
Bumps [djangorestframework](https://github.com/encode/django-rest-framework) from 3.12.3 to 3.12.4.
- [Release notes](https://github.com/encode/django-rest-framework/releases)
- [Commits](https://github.com/encode/django-rest-framework/commits)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-29 06:54:13 +00:00
dependabot[bot]
106129e779 Bump recipe-scrapers from 12.2.1 to 12.2.2
Bumps [recipe-scrapers](https://github.com/hhursev/recipe-scrapers) from 12.2.1 to 12.2.2.
- [Release notes](https://github.com/hhursev/recipe-scrapers/releases)
- [Commits](https://github.com/hhursev/recipe-scrapers/compare/12.2.1...12.2.2)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-29 06:54:06 +00:00
vabene1111
c5d509bf9e added default space/group for o auth signup 2021-03-28 22:16:12 +02:00
vabene1111
8b0f9bc2e7 fixed broken asset link in base html 2021-03-28 22:00:51 +02:00
vabene1111
4db17874c4 added meal master import 2021-03-28 21:50:52 +02:00
vabene1111
f6c491a8e6 added rezkonv importer 2021-03-28 21:13:26 +02:00
vabene1111
e4a9f56352 update integration file split 2021-03-28 19:49:03 +02:00
vabene1111
c1287407a3 added export support for recipe sage 2021-03-28 19:29:09 +02:00
vabene1111
ba1e18410a Merge pull request #510 from ModdedGamers/develop
Cheftap import tweak
2021-03-28 19:08:47 +02:00
vabene1111
7f8e29f1bc added recipe sage and domestica imports 2021-03-28 18:58:37 +02:00
Modded Gamers
6334bee608 Update import_export.md 2021-03-28 12:38:56 -04:00
Modded Gamers
681c57201a Cheftap import tweak
When I submitted my testing .zip, I didn't submit my normal export, because that has some personal data in the recipes. Instead, I made one by had, which was a mistake. The folder contained inside is also called cheftap_export.
2021-03-28 12:37:59 -04:00
vabene1111
738f0781b2 added import for pepperplate 2021-03-28 18:22:30 +02:00
vabene1111
6143e31e1a tweaked chef tap import 2021-03-28 18:04:12 +02:00
vabene1111
d6e6ab24c2 Cheftap import 2021-03-28 17:56:53 +02:00
vabene1111
0492182803 Merge pull request #503 from vabene1111/dependabot/pip/lxml-4.6.3
Bump lxml from 4.6.2 to 4.6.3
2021-03-28 17:10:36 +02:00
vabene1111
22713d884e Merge pull request #504 from vabene1111/dependabot/pip/django-crispy-forms-1.11.2
Bump django-crispy-forms from 1.11.1 to 1.11.2
2021-03-28 17:10:30 +02:00
vabene1111
bd14b77f62 Merge pull request #507 from vabene1111/dependabot/pip/djangorestframework-3.12.3
Bump djangorestframework from 3.12.2 to 3.12.3
2021-03-28 17:10:27 +02:00
dependabot[bot]
6a89ed1bb6 Bump djangorestframework from 3.12.2 to 3.12.3
Bumps [djangorestframework](https://github.com/encode/django-rest-framework) from 3.12.2 to 3.12.3.
- [Release notes](https://github.com/encode/django-rest-framework/releases)
- [Commits](https://github.com/encode/django-rest-framework/compare/3.12.2...3.12.3)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-26 05:58:54 +00:00
vabene1111
25717f6a79 space max 2021-03-24 00:06:34 +01:00
dependabot[bot]
d3ecd52fd2 Bump django-crispy-forms from 1.11.1 to 1.11.2
Bumps [django-crispy-forms](https://github.com/django-crispy-forms/django-crispy-forms) from 1.11.1 to 1.11.2.
- [Release notes](https://github.com/django-crispy-forms/django-crispy-forms/releases)
- [Changelog](https://github.com/django-crispy-forms/django-crispy-forms/blob/master/CHANGELOG.md)
- [Commits](https://github.com/django-crispy-forms/django-crispy-forms/compare/1.11.1...1.11.2)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-22 07:16:11 +00:00
dependabot[bot]
1830eb4edc Bump lxml from 4.6.2 to 4.6.3
Bumps [lxml](https://github.com/lxml/lxml) from 4.6.2 to 4.6.3.
- [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.6.2...lxml-4.6.3)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-22 07:16:06 +00:00
vabene1111
81a8734fac Merge pull request #499 from sebimarkgraf/fix/432-ios-webclip-support
Add iOS webclip icon support
2021-03-20 22:41:13 +01:00
vabene1111
abcef54e72 Merge pull request #498 from vabene1111/dependabot/pip/recipe-scrapers-12.2.1
Bump recipe-scrapers from 12.2.0 to 12.2.1
2021-03-20 22:30:43 +01:00
vabene1111
e15c92cda5 Merge pull request #501 from smilerz/main_fork
fix json direct import when wrapped in @graph
2021-03-20 22:26:06 +01:00
smilerz
45dba6fad2 fix json direct import when wrapped in @graph 2021-03-19 13:23:55 -05:00
Sebastian Markgraf
f67bb3cb98 Add generated icons from icongenerator. 2021-03-19 15:49:12 +01:00
Sebastian Markgraf
53b584da56 Fix errors in favicon SVG. 2021-03-19 12:48:58 +01:00
vabene1111
58fc26904b fixed url importer stuff 2021-03-19 10:05:17 +01:00
dependabot[bot]
7527646319 Bump recipe-scrapers from 12.2.0 to 12.2.1
Bumps [recipe-scrapers](https://github.com/hhursev/recipe-scrapers) from 12.2.0 to 12.2.1.
- [Release notes](https://github.com/hhursev/recipe-scrapers/releases)
- [Commits](https://github.com/hhursev/recipe-scrapers/compare/12.2.0...12.2.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-19 05:51:22 +00:00
vabene1111
d3b1139a22 fixed migration 2021-03-19 00:33:06 +01:00
vabene1111
f04a51c1ad fixed empty units/foods (again) 2021-03-19 00:19:29 +01:00
vabene1111
7fbff9f3b5 sligthly improved login redirects 2021-03-18 23:42:24 +01:00
vabene1111
bb0f3e1778 build recipe view 2021-03-18 23:25:25 +01:00
vabene1111
6ab8d6bd0d Merge pull request #497 from smilerz/recipe_description
Recipe description
2021-03-18 23:23:35 +01:00
vabene1111
69a51e0640 fixed broken messages queing up 2021-03-18 23:20:31 +01:00
vabene1111
1425e795ff telegram create list if not exists and remove debug code 2021-03-18 22:51:06 +01:00
vabene1111
afadc61d5d telegram bot 2021-03-18 22:34:53 +01:00
smilerz
ce8524b247 added data validation on name and description length 2021-03-18 16:03:13 -05:00
smilerz
fd09ae1510 add description to recipe on submit 2021-03-18 15:55:11 -05:00
smilerz
9137fbfb97 Merge remote-tracking branch 'upstream/develop' into recipe_description 2021-03-18 15:33:50 -05:00
vabene1111
f0ac55c20e Merge pull request #388 from cesarblancg/develop
Optimized dockerfile
2021-03-18 20:53:14 +01:00
vabene1111
249663bd91 Merge branch 'develop' into develop 2021-03-18 20:53:08 +01:00
vabene1111
55920501b8 small tweaks 2021-03-18 20:48:28 +01:00
vabene1111
cc3e00e75f Merge branch 'develop' into url_import_recipes
# Conflicts:
#	cookbook/helper/recipe_url_import.py
#	cookbook/tests/api/test_api_keyword.py
#	cookbook/tests/other/test_edits_recipe.py
#	cookbook/views/api.py
#	requirements.txt
2021-03-18 20:38:51 +01:00
vabene1111
661f7ae789 fixed slice fix again 2021-03-18 20:34:37 +01:00
vabene1111
8bfbd96398 fixed slicing issue 2021-03-18 20:24:42 +01:00
vabene1111
8a051b531d import response view 2021-03-18 20:00:13 +01:00
vabene1111
de9456e3d7 import log api 2021-03-18 18:48:29 +01:00
vabene1111
950315936e import log working 2021-03-18 18:30:12 +01:00
vabene1111
af1bc19fd8 fixed importer threading stuff 2021-03-18 18:08:22 +01:00
vabene1111
906da25301 prevent duplicate imports 2021-03-18 17:02:02 +01:00
vabene1111
fe1ddf1237 improved paprika importer 2021-03-18 14:43:19 +01:00
vabene1111
48c90c483a merged PR 474 adding manual json import 2021-03-18 12:36:00 +01:00
vabene1111
3c1b6a5f3a updated unraid docs image 2021-03-18 12:08:12 +01:00
vabene1111
780c929162 fixed url import space 2021-03-18 12:07:02 +01:00
vabene1111
e00b6b9293 fixed meal plan creation from recipe context menu 2021-03-18 11:56:47 +01:00
vabene1111
8c9ee37c46 updated external image viewer 2021-03-18 11:53:32 +01:00
vabene1111
45a0bda758 updated transaltion 2021-03-18 11:53:14 +01:00
vabene1111
e71417e77f Merge pull request #480 from auanasgheps/patch-1
Update Italian Translation
2021-03-18 11:19:58 +01:00
vabene1111
29e6eda9cd Merge pull request #463 from vabene1111/translations_cookbook-locale-en-lc-messages-django-po--develop_nl
Translate '/cookbook/locale/en/LC_MESSAGES/django.po' in 'nl'
2021-03-18 11:19:18 +01:00
vabene1111
32c984c7f0 Merge pull request #482 from vabene1111/dependabot/pip/pillow-8.1.2
Bump pillow from 8.1.0 to 8.1.2
2021-03-18 11:19:02 +01:00
vabene1111
b68d2ba384 Merge pull request #485 from vabene1111/translations_cookbook-locale-en-lc-messages-django-po--develop_es
Translate '/cookbook/locale/en/LC_MESSAGES/django.po' in 'es'
2021-03-18 11:18:28 +01:00
vabene1111
daf0be37fd upgraded javascritp dependencies 2021-03-18 11:18:09 +01:00
vabene1111
2e625715cc updated help request template 2021-03-18 11:14:34 +01:00
vabene1111
6a25428b3c fixed shopping list share permission 2021-03-18 11:04:55 +01:00
vabene1111
cb78f75f19 fixed shopping list auto sync flickering 2021-03-18 10:56:12 +01:00
vabene1111
77cfcb4602 and pytest django 2021-03-17 23:52:41 +01:00
vabene1111
d2a4a9d953 addded pytest as dependency 2021-03-17 23:50:37 +01:00
vabene1111
9280540927 updated ci command 2021-03-17 23:48:49 +01:00
vabene1111
2f77532111 Merge branch 'feature/spaces' into develop 2021-03-17 23:47:35 +01:00
vabene1111
2149f4034b several shopping list improvements 2021-03-17 23:28:28 +01:00
vabene1111
76eeed1a77 all tests migrated and improved 2021-03-17 22:10:58 +01:00
vabene1111
ad0d802e41 more tests 2021-03-17 21:18:54 +01:00
vabene1111
e41464cb31 recipe api test 2021-03-17 20:53:12 +01:00
vabene1111
ab3f7bf671 step api test 2021-03-17 20:46:49 +01:00
vabene1111
e968a57c06 shopping list api tests and refactors 2021-03-17 20:42:17 +01:00
vabene1111
641feede74 space nested serializers 2021-03-17 19:55:34 +01:00
vabene1111
b48708652f delete model check fixes + sync log 2021-03-17 00:27:53 +01:00
vabene1111
c2addc1121 storage api test 2021-03-17 00:14:54 +01:00
vabene1111
a25109e16c added sync api test 2021-03-17 00:03:36 +01:00
vabene1111
ae81b10dbd added supermarket api test 2021-03-16 23:50:51 +01:00
vabene1111
4d6d84bf5b fixed some tests + added user pref tests 2021-03-16 23:46:54 +01:00
vabene1111
a8a132e2a1 fixed recipe book entry api and added test 2021-03-12 12:33:20 +01:00
vabene1111
3b0413c30e add test for recipe book 2021-03-12 10:50:08 +01:00
vabene1111
d767743b64 user name api test 2021-03-12 10:16:51 +01:00
vabene1111
e8f7caebd1 test unit api 2021-03-12 09:52:46 +01:00
vabene1111
a7b7272bec view log api test 2021-03-12 09:50:20 +01:00
vabene1111
d7402f60c5 meal plan api tests 2021-03-12 09:44:16 +01:00
vabene1111
d049cf6d3d ingredient test finished 2021-03-11 21:50:54 +01:00
vabene1111
fdcdf6a026 added food test 2021-03-11 18:23:00 +01:00
vabene1111
7e38e946a5 fixed various space related bugs 2021-03-11 16:41:05 +01:00
vabene1111
b552badff7 fixed limit random recipe 2021-03-11 15:37:37 +01:00
transifex-integration[bot]
d10c84b66e Apply translations in es
translation completed for the source file '/cookbook/locale/en/LC_MESSAGES/django.po'
on the 'es' language.
2021-03-10 23:51:17 +00:00
vabene1111
e7f8d58a7d added test for cook log 2021-03-10 21:25:18 +01:00
vabene1111
528f329ebb new keyword api test working 2021-03-10 20:31:00 +01:00
vabene1111
b9b7a125f0 more tests working but scopes broken 2021-03-10 19:46:08 +01:00
vabene1111
4742056223 tests basically working 2021-03-10 18:18:19 +01:00
vabene1111
ba4c3b95e5 removed deprecated functions/packages 2021-03-10 18:17:31 +01:00
dependabot[bot]
4c03520371 Bump pillow from 8.1.0 to 8.1.2
Bumps [pillow](https://github.com/python-pillow/Pillow) from 8.1.0 to 8.1.2.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/master/CHANGES.rst)
- [Commits](https://github.com/python-pillow/Pillow/compare/8.1.0...8.1.2)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-08 06:58:23 +00:00
smilerz
1f5ddd9af7 limit description in search to 2 lines 2021-03-06 17:36:51 -06:00
smilerz
d3e6b34a63 added description to search and recipe view 2021-03-06 16:32:59 -06:00
Oliver Cervera
323f424630 Update Italian Translation
Italian translation updates.
Manual PR since Transifex doesn't do it.
2021-03-06 13:03:03 +01:00
smilerz
eed6e9d3a5 catch index error 2021-03-04 15:30:20 -06:00
smilerz
f4af7ffb0b except do it right this time 2021-03-04 15:03:33 -06:00
smilerz
3b072d5dd9 check for scrape.schema before using it 2021-03-04 14:59:56 -06:00
smilerz
11240dcf48 Merge branch 'recipe_description' of github.com:smilerz/recipes into recipe_description 2021-03-04 09:30:27 -06:00
smilerz
0b5fc1a9f4 added description to url_import 2021-03-04 09:20:26 -06:00
smilerz
049449bda3 removed recipe description from url_import template 2021-03-04 09:19:25 -06:00
smilerz
e5a19302f0 added description to url_import 2021-03-04 08:38:01 -06:00
smilerz
e1fa939757 pulled description field from url_import template 2021-03-04 08:33:02 -06:00
smilerz
3da33e364e fixed test 2021-03-03 21:15:12 -06:00
smilerz
bfaed434cc refactored url_import to use recipe-scraper 2021-03-03 21:08:34 -06:00
vabene1111
b6acc17e5a Create url_import.md 2021-02-26 10:02:14 +01:00
vabene1111
5fd03e7cdc basics of pytest 2021-02-25 22:36:20 +01:00
vabene1111
54e71f2910 last commit 2021-02-25 22:20:06 +01:00
vabene1111
c99c944130 fixed normal django test running with scopes 2021-02-25 22:19:51 +01:00
transifex-integration[bot]
94c9185bcf Apply translations in nl
translation completed for the source file '/cookbook/locale/en/LC_MESSAGES/django.po'
on the 'nl' language.
2021-02-25 18:59:22 +00:00
vabene1111
74e731e334 inject space context into serializer writes 2021-02-25 16:45:47 +01:00
vabene1111
d01f7409bf removed django-random-queryset
the looping strategy is not efficient when using spacing as ids for a single user might be spaced far apart. A single user also only has a few hundred recipes so using the order by ? method should be more efficient and also automatically be compatible with spaces
2021-02-25 16:44:42 +01:00
vabene1111
29ab6cfb2d Merge branch 'develop' into feature/spaces
# Conflicts:
#	cookbook/views/data.py
#	cookbook/views/views.py
2021-02-25 15:59:32 +01:00
vabene1111
59b2da933d fixed tests 2021-02-25 08:27:22 +01:00
vabene1111
99b5f9a3ec Merge pull request #457 from ProfessorSalty/height-bugfix
Fix height issues in Safari by removing height rules
2021-02-25 08:18:37 +01:00
vabene1111
9057eac42c Merge pull request #460 from vabene1111/dependabot/pip/markdown-3.3.4
Bump markdown from 3.3.3 to 3.3.4
2021-02-25 08:18:27 +01:00
vabene1111
24b5cdff85 Merge pull request #459 from smilerz/fix-456
Fix 456
2021-02-25 08:14:55 +01:00
dependabot[bot]
f2630c3ba0 Bump markdown from 3.3.3 to 3.3.4
Bumps [markdown](https://github.com/Python-Markdown/markdown) from 3.3.3 to 3.3.4.
- [Release notes](https://github.com/Python-Markdown/markdown/releases)
- [Commits](https://github.com/Python-Markdown/markdown/compare/3.3.3...3.3.4)

Signed-off-by: dependabot[bot] <support@github.com>
2021-02-25 06:02:05 +00:00
smilerz
21740522bc fixed URL import when ingredient is a string 2021-02-24 20:13:06 -06:00
smilerz
47090ce863 added tests for add keyword and add duplicate keyword 2021-02-24 18:52:43 -06:00
smilerz
3ac22c08ff fixed duplicate keyword handling 2021-02-24 18:52:04 -06:00
smilerz
cc62b088fd fix URL import when recipeYield is a list 2021-02-24 17:52:40 -06:00
Greg Smith
2c34425135 Remove fixed height rule 2021-02-24 17:36:06 -05:00
vabene1111
205f76d128 fix that does not really fix anything
see #453/454
2021-02-23 21:43:14 +01:00
vabene1111
4147bc61c7 Merge pull request #390 from smilerz/develop
Add keywords during edit & url import
2021-02-23 21:12:45 +01:00
vabene1111
dfae453925 Merge pull request #450 from albcp/develop
Add environment variable to include Sub-Path in resolve.js.
2021-02-23 21:09:56 +01:00
vabene1111
7507cae44c added some info to .env for DB_OPTIONS 2021-02-23 20:56:53 +01:00
vabene1111
28312774bd Merge pull request #434 from angelnu/develop
Add DB_OPTIONS to enable DBs with SSL
2021-02-23 20:55:23 +01:00
vabene1111
058723d583 compiled translations and added hy 2021-02-23 20:54:42 +01:00
vabene1111
db4abdd31d Merge pull request #426 from vabene1111/translations_cookbook-locale-en-lc-messages-django-po--develop_it
Translate '/cookbook/locale/en/LC_MESSAGES/django.po' in 'it'
2021-02-23 20:50:35 +01:00
vabene1111
727b0e9e61 Merge pull request #403 from vabene1111/translations_cookbook-locale-en-lc-messages-django-po--develop_hy
Translate '/cookbook/locale/en/LC_MESSAGES/django.po' in 'hy'
2021-02-23 20:49:40 +01:00
vabene1111
aa41146735 Merge pull request #448 from vabene1111/translations_cookbook-locale-en-lc-messages-django-po--develop_de
Translate '/cookbook/locale/en/LC_MESSAGES/django.po' in 'de'
2021-02-23 20:48:51 +01:00
vabene1111
670fc9bf35 Merge pull request #451 from vabene1111/dependabot/pip/django-autocomplete-light-3.8.2
Bump django-autocomplete-light from 3.8.1 to 3.8.2
2021-02-23 20:48:27 +01:00
vabene1111
d9a5649adc Merge pull request #446 from vabene1111/dependabot/pip/django-3.1.7
Bump django from 3.1.6 to 3.1.7
2021-02-23 20:48:15 +01:00
vabene1111
5ed300a3ea Merge pull request #445 from vabene1111/dependabot/pip/django-crispy-forms-1.11.1
Bump django-crispy-forms from 1.11.0 to 1.11.1
2021-02-23 20:48:04 +01:00
vabene1111
59cc22a877 wip serializer permission 2021-02-23 20:44:13 +01:00
Alberto
8dffc07072 get JS_REVERSE_SCRIPT_PREFIX from SCRIPT_NAME 2021-02-23 18:57:59 +01:00
dependabot[bot]
76c7ad1ff5 Bump django-autocomplete-light from 3.8.1 to 3.8.2
Bumps [django-autocomplete-light](https://github.com/yourlabs/django-autocomplete-light) from 3.8.1 to 3.8.2.
- [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/commits)

Signed-off-by: dependabot[bot] <support@github.com>
2021-02-23 06:02:25 +00:00
vabene1111
7f391c25a4 fixed test 2021-02-22 19:59:43 +01:00
Alberto
bccc41d177 Add environment variable to include Sub-Path in resolve.js. 2021-02-22 19:56:33 +01:00
transifex-integration[bot]
cc882082d2 Apply translations in de
translation completed for the source file '/cookbook/locale/en/LC_MESSAGES/django.po'
on the 'de' language.
2021-02-22 15:41:54 +00:00
dependabot[bot]
689918c1ac Bump django from 3.1.6 to 3.1.7
Bumps [django](https://github.com/django/django) from 3.1.6 to 3.1.7.
- [Release notes](https://github.com/django/django/releases)
- [Commits](https://github.com/django/django/compare/3.1.6...3.1.7)

Signed-off-by: dependabot[bot] <support@github.com>
2021-02-22 07:00:34 +00:00
dependabot[bot]
1c43be3899 Bump django-crispy-forms from 1.11.0 to 1.11.1
Bumps [django-crispy-forms](https://github.com/django-crispy-forms/django-crispy-forms) from 1.11.0 to 1.11.1.
- [Release notes](https://github.com/django-crispy-forms/django-crispy-forms/releases)
- [Changelog](https://github.com/django-crispy-forms/django-crispy-forms/blob/master/CHANGELOG.md)
- [Commits](https://github.com/django-crispy-forms/django-crispy-forms/compare/1.11.0...1.11.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-02-22 07:00:29 +00:00
vabene1111
40387428e7 recipe filter 2021-02-21 16:49:34 +01:00
vabene1111
46fb02376e recipe share basics 2021-02-21 16:37:04 +01:00
vabene1111
24e43e3e2e updated migrations + setup process update 2021-02-21 15:34:35 +01:00
vabene1111
846c660811 usr signup and more 2021-02-21 15:08:43 +01:00
vabene1111
beb4aa634f forms 2021-02-20 23:42:44 +01:00
vabene1111
58c6077925 basic test stuff 2021-02-20 22:56:29 +01:00
vabene1111
d7675d4b80 ingredients and helpers 2021-02-20 21:26:16 +01:00
vabene1111
e2b1115b3b fixed servings blank 2021-02-20 18:50:28 +01:00
vabene1111
96c963795e more spaces work 2021-02-20 18:47:14 +01:00
Vegetto
804adde964 Parse DB_OPTIONS dict 2021-02-20 16:54:42 +01:00
Vegetto
5aa918f478 Document DB_OPTIONS env 2021-02-20 16:53:02 +01:00
Vegetto
a44f72a030 Add DB_OPTIONS to enable DBs with SSL 2021-02-20 16:42:48 +01:00
vabene1111
ad163509b4 updated edit and added space find methods 2021-02-19 18:09:42 +01:00
vabene1111
fb58d35029 space stuff partially working 2021-02-19 15:50:55 +01:00
transifex-integration[bot]
79f823cd62 Apply translations in it
translation completed for the source file '/cookbook/locale/en/LC_MESSAGES/django.po'
on the 'it' language.
2021-02-19 13:42:50 +00:00
vabene1111
c42266b82c basic space stuff 2021-02-19 11:53:30 +01:00
tourn
331d85a993 Add support for DATABASE_URL env var 2021-02-19 11:37:23 +01:00
smilerz
c60c3f1876 Revert "minor edit"
This reverts commit 35f3ecc7eb.
2021-02-18 07:28:26 -06:00
smilerz
fc5455a0f2 Revert "added new keyword management page"
This reverts commit 6962b0e218.
2021-02-18 07:27:43 -06:00
smilerz
28d8f62af7 Revert "add filter to new keywords page"
This reverts commit c6dd55df4e.
2021-02-18 07:25:31 -06:00
vabene1111
b6b505c361 fixed nutrition scaling fractiosn 2021-02-18 11:11:07 +01:00
vabene1111
97cef449c9 fixed recipe template rendering scaling issue 2021-02-18 09:37:17 +01:00
vabene1111
fef6f695ce chowdown import folder syntax support 2021-02-18 09:36:13 +01:00
vabene1111
73a24a8ef0 chowdown doc warning 2021-02-18 09:29:11 +01:00
vabene1111
e727cae020 fixed typo that broke fractions 2021-02-18 09:17:42 +01:00
smilerz
c6dd55df4e add filter to new keywords page 2021-02-17 10:45:31 -06:00
smilerz
6962b0e218 added new keyword management page 2021-02-17 07:09:19 -06:00
vabene1111
894d2d2e6b gracful recipes api error on wrong format of update_at 2021-02-16 22:14:40 +01:00
transifex-integration[bot]
8bf4a32dfd Apply translations in hy
translation completed for the source file '/cookbook/locale/en/LC_MESSAGES/django.po'
on the 'hy' language.
2021-02-16 19:31:09 +00:00
smilerz
505650518e Merge branch 'develop' of https://github.com/vabene1111/recipes into develop 2021-02-16 07:45:22 -06:00
smilerz
35f3ecc7eb minor edit 2021-02-16 07:44:41 -06:00
vabene1111
543e52d596 updated preview image 2021-02-15 22:05:04 +01:00
vabene1111
f39433142d typo 2021-02-15 21:48:21 +01:00
vabene1111
f2765c75c6 favicon path in markdown docs 2021-02-15 21:16:31 +01:00
vabene1111
47049808b7 Merge branch 'beta' into develop 2021-02-15 21:02:12 +01:00
vabene1111
150d4c7309 refactor assset and paths 2021-02-15 21:01:54 +01:00
vabene1111
d116d08adf Merge pull request #401 from tdvantine/patch-3
Update .env.template
2021-02-15 20:51:42 +01:00
vabene1111
82d2e479b2 Merge pull request #400 from tdvantine/patch-2
Update Recipes.conf
2021-02-15 20:48:35 +01:00
tdvantine
df81aec02e Update .env.template
Matched the db user to that of the install instructions, fixed some grammar/spelling error and simplified wording...hopefully.
2021-02-15 11:25:58 -07:00
tdvantine
74779fc488 Update Recipes.conf 2021-02-15 10:25:10 -07:00
vabene1111
ac9922ff61 manifest fixes 2021-02-15 16:08:18 +01:00
vabene1111
ff0cd6fa93 fixed import log 2021-02-15 15:30:19 +01:00
vabene1111
777f4518be servings default to 1 on import 2021-02-15 15:16:15 +01:00
vabene1111
84591fd17a fixed issue with shopping list saving 2021-02-15 15:13:59 +01:00
vabene1111
7536425e39 added czech locale 2021-02-15 15:13:40 +01:00
vabene1111
9d28ce48fe Merge pull request #397 from vabene1111/translations_cookbook-locale-en-lc-messages-django-po--develop_cs
Translate '/cookbook/locale/en/LC_MESSAGES/django.po' in 'cs'
2021-02-15 15:11:50 +01:00
vabene1111
d6b438b5f4 Merge pull request #398 from l0c4lh057/master
Fix ingredient parsing for fractions using '/'
2021-02-14 18:51:18 +01:00
Aaron
87d6ca0200 Fix ingredient parsing for fractions using '/'
Even though ingredients like '1 1/2 something' already worked fine and got converted to 1.5 something
I just came across a recipe using '1/2' as the whole amount without any whole number before that.
Apparently I overlooked that case before so I now also fixed that.
2021-02-14 18:43:38 +01:00
transifex-integration[bot]
bcda57a4fa Apply translations in cs
translation completed for the source file '/cookbook/locale/en/LC_MESSAGES/django.po'
on the 'cs' language.
2021-02-14 13:12:22 +00:00
vabene1111
3e55207a8d fixed path 2021-02-13 18:19:38 +01:00
vabene1111
80eee945a0 updated logo path 2021-02-13 18:08:05 +01:00
vabene1111
3436ef4877 added cname file 2021-02-13 18:06:40 +01:00
vabene1111
20e9d4a990 new style and icon 2021-02-13 18:04:33 +01:00
vabene1111
3a1c9aa462 Update README.md 2021-02-13 15:54:08 +01:00
vabene1111
de9f0ad8f8 Update README.md 2021-02-13 15:51:21 +01:00
vabene1111
61f43f78ec Update README.md 2021-02-13 15:42:20 +01:00
vabene1111
a3f2c1bed2 Testing new logo 2021-02-13 15:28:10 +01:00
smilerz
e0a0eeeecc add keyword during url import 2021-02-09 12:55:40 -06:00
smilerz
4a4dafd69c add keyword during recipe edit 2021-02-09 11:17:31 -06:00
vabene1111
6781128c1b added help to import/export 2021-02-09 18:02:45 +01:00
vabene1111
73b7f60222 translations 2021-02-09 18:01:32 +01:00
vabene1111
46a9d19374 safron import 2021-02-09 17:34:38 +01:00
vabene1111
6ba1ff4505 added chowdown importer 2021-02-09 17:15:47 +01:00
vabene1111
58c5b2c301 add paprika import image support 2021-02-09 16:10:28 +01:00
vabene1111
5d1d6d4248 added mealie importer 2021-02-08 21:19:46 +01:00
vabene1111
0f251bee9b nextcloud import instructions 2021-02-08 19:27:18 +01:00
vabene1111
149c5b5f5e nextcloud import working with images 2021-02-08 19:19:56 +01:00
vabene1111
7d051336d3 basic nextcloud import 2021-02-08 19:09:45 +01:00
vabene1111
79da8db889 added paprika import 2021-02-08 13:47:06 +01:00
vabene1111
ec842aa657 testing docker with new dependecy 2021-02-08 11:55:40 +01:00
vabene1111
61c2d5eb61 import export docs and docker tests 2021-02-08 11:52:22 +01:00
vabene1111
41e3ec41e9 update pip during build 2021-02-08 11:41:28 +01:00
vabene1111
086570ce90 using new import/export module 2021-02-08 11:38:38 +01:00
vabene1111
d2783429a1 added documentation to importer 2021-02-08 11:26:41 +01:00
vabene1111
de19a10cba more abstract import/export interface 2021-02-08 11:18:13 +01:00
vabene1111
f312631676 import tag recipes and show results after import 2021-02-08 10:54:04 +01:00
vabene1111
6c52b7bbd9 remove pre commit from build dependencies 2021-02-08 10:02:30 +01:00
vabene1111
900f1a6f7a Merge pull request #389 from vabene1111/dependabot/pip/pre-commit-2.10.1
Bump pre-commit from 2.10.0 to 2.10.1
2021-02-08 08:46:06 +01:00
dependabot[bot]
ff0a7c5262 Bump pre-commit from 2.10.0 to 2.10.1
Bumps [pre-commit](https://github.com/pre-commit/pre-commit) from 2.10.0 to 2.10.1.
- [Release notes](https://github.com/pre-commit/pre-commit/releases)
- [Changelog](https://github.com/pre-commit/pre-commit/blob/master/CHANGELOG.md)
- [Commits](https://github.com/pre-commit/pre-commit/compare/v2.10.0...v2.10.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-02-08 06:47:48 +00:00
vabene1111
e0acd1de83 importing with image files working 2021-02-07 14:50:43 +01:00
vabene1111
585c31490a export recipe without wrting files 2021-02-07 14:01:37 +01:00
vabene1111
3e7f96c0b8 basic export to zip working 2021-02-07 13:43:24 +01:00
vabene1111
d45adc1688 wip on new import/export system 2021-02-07 13:27:15 +01:00
cesarblancg
c857d092b1 Optimized dockerfile 2021-02-04 10:07:43 +01:00
vabene1111
b0fe98c091 fixed shopping url 2021-02-03 23:50:33 +01:00
vabene1111
103878e107 shopping list shortcut link 2021-02-03 23:05:42 +01:00
vabene1111
175fca2b39 Merge pull request #386 from cesarblancg/develop
Solving Apple web app issue
2021-02-03 20:35:32 +01:00
vabene1111
4600aab13a fixed unit merge bug 2021-02-03 20:28:36 +01:00
vabene1111
966a107414 fixed merge of uncreated food entries 2021-02-03 20:15:42 +01:00
vabene1111
69674e2648 allow entry mode toggle 2021-02-03 19:51:43 +01:00
vabene1111
bcd2e44493 added simple entry mode to shopping 2021-02-03 19:38:09 +01:00
cesarblancg
e745e4be0c Solving ipad pro issue 2021-02-03 18:49:48 +01:00
vabene1111
3afd18ccdc Merge pull request #378 from vabene1111/dependabot/pip/django-3.1.6
Bump django from 3.1.5 to 3.1.6
2021-02-02 08:47:50 +01:00
dependabot[bot]
24f1fb228e Bump django from 3.1.5 to 3.1.6
Bumps [django](https://github.com/django/django) from 3.1.5 to 3.1.6.
- [Release notes](https://github.com/django/django/releases)
- [Commits](https://github.com/django/django/compare/3.1.5...3.1.6)

Signed-off-by: dependabot[bot] <support@github.com>
2021-02-02 07:47:36 +00:00
vabene1111
431e213514 Merge pull request #379 from vabene1111/dependabot/pip/bleach-3.3.0
Bump bleach from 3.2.3 to 3.3.0
2021-02-02 08:46:57 +01:00
dependabot[bot]
1e00fa16db Bump bleach from 3.2.3 to 3.3.0
Bumps [bleach](https://github.com/mozilla/bleach) from 3.2.3 to 3.3.0.
- [Release notes](https://github.com/mozilla/bleach/releases)
- [Changelog](https://github.com/mozilla/bleach/blob/master/CHANGES)
- [Commits](https://github.com/mozilla/bleach/compare/v3.2.3...v3.3.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-02-02 06:06:55 +00:00
vabene1111
ac1c283efb Merge pull request #373 from vabene1111/dependabot/pip/jinja2-2.11.3
Bump jinja2 from 2.11.2 to 2.11.3
2021-02-01 09:42:10 +01:00
vabene1111
0a6a8b760f Merge pull request #374 from vabene1111/dependabot/pip/django-crispy-forms-1.11.0
Bump django-crispy-forms from 1.10.0 to 1.11.0
2021-02-01 09:42:01 +01:00
dependabot[bot]
4cdd784259 Bump django-crispy-forms from 1.10.0 to 1.11.0
Bumps [django-crispy-forms](https://github.com/django-crispy-forms/django-crispy-forms) from 1.10.0 to 1.11.0.
- [Release notes](https://github.com/django-crispy-forms/django-crispy-forms/releases)
- [Changelog](https://github.com/django-crispy-forms/django-crispy-forms/blob/master/CHANGELOG.md)
- [Commits](https://github.com/django-crispy-forms/django-crispy-forms/compare/1.10.0...1.11.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-02-01 07:31:37 +00:00
dependabot[bot]
461cb20a4f Bump jinja2 from 2.11.2 to 2.11.3
Bumps [jinja2](https://github.com/pallets/jinja) from 2.11.2 to 2.11.3.
- [Release notes](https://github.com/pallets/jinja/releases)
- [Changelog](https://github.com/pallets/jinja/blob/master/CHANGES.rst)
- [Commits](https://github.com/pallets/jinja/compare/2.11.2...2.11.3)

Signed-off-by: dependabot[bot] <support@github.com>
2021-02-01 07:31:33 +00:00
vabene1111
7ebf4d5e2a Merge pull request #366 from vabene1111/translations_cookbook-locale-en-lc-messages-django-po--develop_nl
Translate '/cookbook/locale/en/LC_MESSAGES/django.po' in 'nl'
2021-01-31 13:01:21 +01:00
transifex-integration[bot]
e50d3233fd Apply translations in nl
translation completed for the source file '/cookbook/locale/en/LC_MESSAGES/django.po'
on the 'nl' language.
2021-01-29 18:41:14 +00:00
vabene1111
cc980b2e8a fixed broken test for good and improved file api 2021-01-28 16:21:19 +01:00
vabene1111
93e965697a updated test to reflect new permission 2021-01-28 16:17:29 +01:00
vabene1111
8d65d20d1f account linking and docs update 2021-01-28 16:10:26 +01:00
vabene1111
a112824578 maybe fixed container build 2021-01-28 15:19:12 +01:00
vabene1111
6192277778 working on authentication 2021-01-28 15:11:38 +01:00
vabene1111
148324b37f fixed nutrition value database duplication 2021-01-28 14:44:23 +01:00
vabene1111
c30ce471c2 api permissions + shopping list on mobile 2021-01-28 14:41:00 +01:00
vabene1111
63cfa14a21 allauth working and integrated 2021-01-28 13:40:07 +01:00
vabene1111
53c715b6f6 Merge branch 'develop' into feature/allauth
# Conflicts:
#	requirements.txt
2021-01-28 12:07:30 +01:00
vabene1111
96146a388a added recipes to shopping list 2021-01-28 11:20:51 +01:00
vabene1111
d2a0bb1ec1 Merge pull request #362 from vabene1111/dependabot/pip/pre-commit-2.10.0
Bump pre-commit from 2.9.3 to 2.10.0
2021-01-28 10:48:54 +01:00
dependabot[bot]
d826b9f38a Bump pre-commit from 2.9.3 to 2.10.0
Bumps [pre-commit](https://github.com/pre-commit/pre-commit) from 2.9.3 to 2.10.0.
- [Release notes](https://github.com/pre-commit/pre-commit/releases)
- [Changelog](https://github.com/pre-commit/pre-commit/blob/master/CHANGELOG.md)
- [Commits](https://github.com/pre-commit/pre-commit/compare/v2.9.3...v2.10.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-01-28 06:15:44 +00:00
vabene1111
e8d9cc6ad9 shopping list null entry 2021-01-27 17:48:08 +01:00
vabene1111
e9689d347c Merge pull request #356 from vabene1111/dependabot/pip/bleach-3.2.3
Bump bleach from 3.2.2 to 3.2.3
2021-01-27 08:44:11 +01:00
dependabot[bot]
b275fdcf62 Bump bleach from 3.2.2 to 3.2.3
Bumps [bleach](https://github.com/mozilla/bleach) from 3.2.2 to 3.2.3.
- [Release notes](https://github.com/mozilla/bleach/releases)
- [Changelog](https://github.com/mozilla/bleach/blob/master/CHANGES)
- [Commits](https://github.com/mozilla/bleach/compare/v3.2.2...v3.2.3)

Signed-off-by: dependabot[bot] <support@github.com>
2021-01-27 06:17:50 +00:00
vabene1111
a0ebc47ade api permission fixes + shopping list default view mode 2021-01-26 22:15:09 +01:00
vabene1111
b698fad83a fixed no_amount ingredients showing units in ingredient list 2021-01-26 22:00:46 +01:00
vabene1111
5e53c66eaa added ingredient headers again 2021-01-26 21:55:36 +01:00
vabene1111
37008ef290 added unaccent filter for recipe search 2021-01-26 21:14:33 +01:00
vabene1111
35ee5847ca shopping list and docs 2021-01-26 20:58:19 +01:00
vabene1111
935dee853e added ordering of supermarket categories 2021-01-26 19:19:42 +01:00
vabene1111
7b75e279b0 shopping list ui somewhat bearable 2021-01-26 18:21:45 +01:00
vabene1111
15c758b24a update food after changing category 2021-01-26 18:08:41 +01:00
vabene1111
26ec1724a5 updating food working 2021-01-26 17:56:43 +01:00
vabene1111
96c4823664 supermarket shopping list relation 2021-01-26 16:53:05 +01:00
vabene1111
5ab19b7958 supermarket category api working 2021-01-26 16:16:45 +01:00
vabene1111
09716f2b00 wip supermarket categories 2021-01-25 21:58:24 +01:00
vabene1111
138a29770a added supermarket categories to shopping 2021-01-25 21:20:40 +01:00
vabene1111
36584346cb fixed merging and added shopping ignored ingredients 2021-01-25 20:46:19 +01:00
vabene1111
c7dd5dd8bb wip shopping list stuff 2021-01-25 18:21:55 +01:00
vabene1111
a16ad2c887 added ingredient merging to shopping list 2021-01-25 17:24:03 +01:00
vabene1111
ca728b45ca made it possible to disable signup 2021-01-24 16:41:25 +01:00
vabene1111
9fd87dbf23 fixed misaligned check buttons 2021-01-24 16:14:56 +01:00
vabene1111
384a49b1c6 updated docs 2021-01-22 22:48:14 +01:00
vabene1111
477236009c disable settings in demo 2021-01-22 22:38:16 +01:00
vabene1111
93cff8873e docs type 2021-01-22 22:12:17 +01:00
vabene1111
d9feb61e85 updated documentation 2021-01-22 21:58:39 +01:00
vabene1111
00875c0d8e added help page linking 2021-01-22 21:32:29 +01:00
vabene1111
f1b7ed7d7a added option to choose webdav path 2021-01-22 20:29:29 +01:00
vabene1111
fce293e722 fixed tests 2021-01-21 20:58:20 +01:00
vabene1111
09062cb12c fixed recipe book api error 2021-01-21 20:57:26 +01:00
vabene1111
098f88e0b8 super basic working example 2021-01-21 20:54:55 +01:00
vabene1111
6992bf83aa added customizable Servings text 2021-01-21 20:05:46 +01:00
vabene1111
32044907bf template hint 2021-01-21 19:58:18 +01:00
vabene1111
3fcd613ca8 fixed side buttons in recipe edit moving under sticky nav 2021-01-21 19:45:12 +01:00
vabene1111
5b8a22762b fixed print for new recipe view 2021-01-21 19:40:47 +01:00
vabene1111
c41c319d25 added servings to url import 2021-01-21 19:39:06 +01:00
vabene1111
6690c3b206 fixed service worker caching problem 2021-01-21 19:08:36 +01:00
vabene1111
56bcd4f887 very basic offline page working 2021-01-21 18:39:24 +01:00
vabene1111
47c690526e service worker stuff work in progress 2021-01-21 16:16:49 +01:00
vabene1111
ec14338159 fixed share link with pre defined username 2021-01-21 14:42:49 +01:00
vabene1111
bf3fe1c716 Merge pull request #351 from vabene1111/dependabot/pip/pyyaml-5.4.1
Bump pyyaml from 5.4 to 5.4.1
2021-01-21 09:39:47 +01:00
vabene1111
fede79fc04 Merge pull request #352 from vabene1111/dependabot/pip/bleach-3.2.2
Bump bleach from 3.2.1 to 3.2.2
2021-01-21 09:39:34 +01:00
dependabot[bot]
9251613cd6 Bump bleach from 3.2.1 to 3.2.2
Bumps [bleach](https://github.com/mozilla/bleach) from 3.2.1 to 3.2.2.
- [Release notes](https://github.com/mozilla/bleach/releases)
- [Changelog](https://github.com/mozilla/bleach/blob/master/CHANGES)
- [Commits](https://github.com/mozilla/bleach/compare/v3.2.1...v3.2.2)

Signed-off-by: dependabot[bot] <support@github.com>
2021-01-21 05:50:44 +00:00
dependabot[bot]
0bd6df9d57 Bump pyyaml from 5.4 to 5.4.1
Bumps [pyyaml](https://github.com/yaml/pyyaml) from 5.4 to 5.4.1.
- [Release notes](https://github.com/yaml/pyyaml/releases)
- [Changelog](https://github.com/yaml/pyyaml/blob/master/CHANGES)
- [Commits](https://github.com/yaml/pyyaml/compare/5.4...5.4.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-01-21 05:50:43 +00:00
vabene1111
24e660156c Merge pull request #348 from vabene1111/dependabot/pip/pyyaml-5.4
Bump pyyaml from 5.3.1 to 5.4
2021-01-20 10:33:51 +01:00
dependabot[bot]
345ffe4d6d Bump pyyaml from 5.3.1 to 5.4
Bumps [pyyaml](https://github.com/yaml/pyyaml) from 5.3.1 to 5.4.
- [Release notes](https://github.com/yaml/pyyaml/releases)
- [Changelog](https://github.com/yaml/pyyaml/blob/master/CHANGES)
- [Commits](https://github.com/yaml/pyyaml/compare/5.3.1...5.4)

Signed-off-by: dependabot[bot] <support@github.com>
2021-01-20 05:56:58 +00:00
vabene1111
e5b7cf5f30 further improvised import/export feature 2021-01-19 21:41:52 +01:00
vabene1111
b563447674 ingredient linking fixed + tests fixed 2021-01-19 21:26:20 +01:00
vabene1111
523a2b41d1 fixed keyboard import edit 2021-01-19 21:11:02 +01:00
vabene1111
a0741f6ad3 added warning message to meal plan if no type is given 2021-01-19 20:55:51 +01:00
vabene1111
b52c3d6bd4 testing with the offline page 2021-01-17 21:26:56 +01:00
vabene1111
803369a7a6 basic offline page working 2021-01-17 21:11:03 +01:00
vabene1111
2e3e629406 actually decent service worker wip 2021-01-17 18:33:12 +01:00
vabene1111
d7894e07e9 service worker stuff 2021-01-17 16:58:50 +01:00
vabene1111
63dbdfa4a6 removed service worker stuff 2021-01-17 14:47:13 +01:00
vabene1111
961b3f07b5 added demo setting 2021-01-17 14:37:34 +01:00
vabene1111
7a1ee9a9b2 fixed documentation mistake (again) 2021-01-17 14:06:56 +01:00
vabene1111
f18980a9e2 workbox expirments 2021-01-14 13:31:56 +01:00
vabene1111
08733751aa add to book reimplemented 2021-01-14 01:21:15 +01:00
vabene1111
b271f81af2 updated hook + compiled again 2021-01-14 00:05:42 +01:00
vabene1111
0900e4c57d cleanup 2021-01-14 00:02:11 +01:00
vabene1111
d99e523608 added pre commit hooks and some other workflow stuff 2021-01-14 00:00:26 +01:00
vabene1111
50829dce47 fixed access for shared recipes 2021-01-13 22:59:19 +01:00
vabene1111
910dc29f06 updated javascript files 2021-01-13 22:48:50 +01:00
vabene1111
486c871cb5 also revert boot script for now 2021-01-13 22:35:27 +01:00
vabene1111
2b94500ffe restored old dockerfile order until time for optimization 2021-01-13 22:32:54 +01:00
vabene1111
d25ea34512 moved back together 2021-01-13 22:30:47 +01:00
vabene1111
fbc3dcdfef test 2021-01-13 22:23:00 +01:00
vabene1111
642015b368 testing docker stuff 2021-01-13 22:17:40 +01:00
vabene1111
99f06955dc corrected servings factor 2021-01-13 21:35:39 +01:00
vabene1111
9e5a7b2cc0 added loading spinner and made new view the main recipe view 2021-01-13 20:59:31 +01:00
vabene1111
948eb9be3e keywords 2021-01-13 20:49:04 +01:00
vabene1111
ec778edb93 alignment 2021-01-13 20:41:42 +01:00
vabene1111
a431031c04 ingredient checking 2021-01-13 20:12:20 +01:00
vabene1111
082a656210 Revert "refactored ingredient components"
This reverts commit 9f51b9fd16.
2021-01-13 19:40:39 +01:00
vabene1111
9f51b9fd16 refactored ingredient components 2021-01-13 18:42:59 +01:00
vabene1111
98aadf2869 cooklog improvements 2021-01-13 18:11:42 +01:00
vabene1111
54107000af fixed some browser warnings 2021-01-13 18:05:02 +01:00
vabene1111
999fe2bc61 timers added in recipe view 2021-01-13 17:58:51 +01:00
vabene1111
23bd0a7d90 fixed recipe context menu 2021-01-13 15:51:13 +01:00
vabene1111
f9059f636c update docs + removed old import 2021-01-13 15:25:34 +01:00
vabene1111
95aff5c998 cook log 2021-01-13 15:21:51 +01:00
vabene1111
bf9b8a0230 updated ci + build static files 2021-01-13 13:28:31 +01:00
vabene1111
c79432567c valid_until migration fix 2021-01-13 13:26:57 +01:00
vabene1111
ddc484562b recipe description 2021-01-13 13:26:48 +01:00
vabene1111
97b5f64718 pretty decent looking view 2021-01-13 13:12:22 +01:00
vabene1111
b042ab72cd wip step design 2021-01-13 12:29:23 +01:00
vabene1111
a59ac44f3b recipe page styling 2021-01-13 10:57:38 +01:00
vabene1111
acafcbc077 WIP but slowly seeing progress 2021-01-13 03:28:10 +01:00
vabene1111
6ff0e3b7b3 slowly looking somewhat decently 2021-01-13 03:13:07 +01:00
vabene1111
bb43ed203a display of external recipes 2021-01-13 02:16:16 +01:00
vabene1111
1bb412e007 sanitize inputs of jinja so that output does not need to be 2021-01-13 01:34:21 +01:00
vabene1111
e69d1c3408 save 2021-01-13 01:23:20 +01:00
vabene1111
cd51d12618 still working 2021-01-13 01:16:52 +01:00
vabene1111
ee130f9077 its working 2021-01-13 01:14:03 +01:00
vabene1111
0eebd438ca commit 2021-01-13 01:08:51 +01:00
vabene1111
983d40f2c1 save WIP 2021-01-12 23:28:13 +01:00
vabene1111
bbd01fdb04 Merge branch 'develop' into feature/vue 2021-01-12 21:40:32 +01:00
vabene1111
ea2f493e01 fixed request context for recipe serializer on import 2021-01-12 21:40:14 +01:00
vabene1111
9b364d57c7 partially working recipe view 2021-01-12 21:32:24 +01:00
vabene1111
068a09e28e reverted config change 2021-01-12 21:13:06 +01:00
vabene1111
83c7e318ea secure proxy headers 2021-01-12 21:05:29 +01:00
vabene1111
24ed6a1cd2 recipe stuff 2021-01-12 20:51:28 +01:00
vabene1111
816ced83b5 currently everything working 2021-01-12 19:50:21 +01:00
vabene1111
b93fb99e1b Merge pull request #333 from vabene1111/translations_cookbook-locale-en-lc-messages-django-po--develop_ca
Translate '/cookbook/locale/en/LC_MESSAGES/django.po' in 'ca'
2021-01-12 08:08:48 +01:00
transifex-integration[bot]
9203b8e985 Apply translations in ca
translation completed for the source file '/cookbook/locale/en/LC_MESSAGES/django.po'
on the 'ca' language.
2021-01-11 22:37:24 +00:00
vabene1111
7b936ec4fd removed some debug code 2021-01-11 22:00:40 +01:00
vabene1111
99f0ab830b localization in vue apps working 2021-01-11 22:00:23 +01:00
vabene1111
34028587fc working on a recipe view 2021-01-11 18:31:06 +01:00
vabene1111
df0cfc3677 Merge branch 'develop' into feature/vue 2021-01-11 16:20:49 +01:00
vabene1111
16e2af8c5d remove debug code from service worker 2021-01-11 16:20:32 +01:00
vabene1111
02aec7d6d6 very WIP 2021-01-11 16:19:37 +01:00
vabene1111
cb913f6cea some test code and playing around 2021-01-11 15:04:35 +01:00
vabene1111
5bb20bd479 Merge branch 'develop' into feature/vue 2021-01-11 10:04:55 +01:00
vabene1111
c561ddc08c fixed share link 2021-01-11 10:04:45 +01:00
vabene1111
fd3743377b Merge pull request #328 from bloomcake/small-cleanup
Small cleanup
2021-01-11 09:55:14 +01:00
vabene1111
381c3bf3fa Merge pull request #329 from vabene1111/translations_cookbook-locale-en-lc-messages-django-po--develop_it
Translate '/cookbook/locale/en/LC_MESSAGES/django.po' in 'it'
2021-01-11 09:43:43 +01:00
vabene1111
5d37a1dc0b Merge pull request #330 from vabene1111/dependabot/pip/django-tables2-2.3.4
Bump django-tables2 from 2.3.3 to 2.3.4
2021-01-11 09:43:34 +01:00
dependabot[bot]
cf07040ece Bump django-tables2 from 2.3.3 to 2.3.4
Bumps [django-tables2](https://github.com/jieter/django-tables2) from 2.3.3 to 2.3.4.
- [Release notes](https://github.com/jieter/django-tables2/releases)
- [Changelog](https://github.com/jieter/django-tables2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jieter/django-tables2/compare/v2.3.3...v2.3.4)

Signed-off-by: dependabot[bot] <support@github.com>
2021-01-11 07:06:07 +00:00
transifex-integration[bot]
f2028ee928 Apply translations in it
translation completed for the source file '/cookbook/locale/en/LC_MESSAGES/django.po'
on the 'it' language.
2021-01-10 23:01:06 +00:00
enrico-kaack
0c39ddcf66 Fixed: inconsistent volume naming as mentioned in #317 2021-01-10 22:56:18 +01:00
Tobias Lindenberg
8ddbc34017 resolve conflicts
Signed-off-by: Tobias Lindenberg <tobias@lindenberg.pm>
2021-01-10 14:44:20 +01:00
Tobias Lindenberg
6ef06b2650 recipes 2021-01-10 14:36:10 +01:00
Tobias Lindenberg
67581c7fa4 tests/api 2021-01-10 14:32:41 +01:00
Tobias Lindenberg
bc1f28eda6 tests/edits 2021-01-10 14:23:52 +01:00
Tobias Lindenberg
61daf9d5c9 tests/other 2021-01-10 14:16:28 +01:00
Tobias Lindenberg
a37c77bb84 tests/views 2021-01-10 14:14:27 +01:00
Tobias Lindenberg
6d2c48a1c8 tests/test_setup 2021-01-10 14:11:29 +01:00
Tobias Lindenberg
bed5b72864 templatetags/theming_tags 2021-01-10 14:10:21 +01:00
Tobias Lindenberg
325d6e4326 templatetags/custom_tags 2021-01-10 14:08:23 +01:00
Tobias Lindenberg
f7ff700c7a provider/nextcloud 2021-01-10 14:06:58 +01:00
Tobias Lindenberg
41c8e53569 provider/dropbox 2021-01-10 14:03:57 +01:00
Tobias Lindenberg
ff8e431630 helper/init 2021-01-10 13:59:27 +01:00
Tobias Lindenberg
eb9b2ac6fe helper/template_helper 2021-01-10 13:57:51 +01:00
Tobias Lindenberg
1ad468e652 helper/recipe_url_import 2021-01-10 13:57:06 +01:00
Tobias Lindenberg
986bda0c81 helper/permission_helper 2021-01-10 13:51:55 +01:00
Tobias Lindenberg
bb361001b9 helper/permissions_config 2021-01-10 13:47:23 +01:00
Tobias Lindenberg
26aa0207aa helper/mdx_urlize 2021-01-10 13:46:53 +01:00
Tobias Lindenberg
8b1bd3c555 helper/ingredient_parser 2021-01-10 13:45:33 +01:00
Tobias Lindenberg
b59c7288b1 helper/ingredient_parser 2021-01-10 13:44:55 +01:00
Tobias Lindenberg
f5b456018d helper/dal 2021-01-10 13:41:09 +01:00
Tobias Lindenberg
4dad26102a fix recipeimport 2021-01-10 13:28:57 +01:00
Tobias Lindenberg
afc7718c95 urls 2021-01-10 13:28:18 +01:00
Tobias Lindenberg
e5ef19ffe4 tables 2021-01-10 13:15:01 +01:00
Tobias Lindenberg
ecf065db2b serializer 2021-01-10 13:12:06 +01:00
Tobias Lindenberg
4c03d1eb87 models 2021-01-10 13:09:23 +01:00
Tobias Lindenberg
b71e9fe57d forms 2021-01-10 13:05:04 +01:00
Tobias Lindenberg
7ab6276397 filters 2021-01-10 12:46:02 +01:00
Tobias Lindenberg
c7da37e7e7 admin 2021-01-10 12:44:42 +01:00
Tobias Lindenberg
00f9bc087c views/view 2021-01-10 12:42:24 +01:00
Tobias Lindenberg
f2c658cb2d views/new 2021-01-10 12:25:28 +01:00
Tobias Lindenberg
c35f71370e views/lists 2021-01-10 12:22:22 +01:00
Tobias Lindenberg
edb9c883f7 views/import_export 2021-01-10 12:19:39 +01:00
Tobias Lindenberg
0405c123f4 views/edit 2021-01-10 12:16:10 +01:00
Tobias Lindenberg
b84a330883 views/delete 2021-01-10 12:12:16 +01:00
Tobias Lindenberg
2d8c6ef44a views/data 2021-01-10 12:10:54 +01:00
Tobias Lindenberg
6af5f59c80 views/api 2021-01-10 12:06:49 +01:00
Tobias Lindenberg
3c4384e2f6 views/__init__ 2021-01-10 12:06:40 +01:00
vabene1111
e50239f067 added basic service worker 2021-01-10 12:00:16 +01:00
Tobias Lindenberg
4fa6919ca0 sort views imports 2021-01-10 11:55:21 +01:00
vabene1111
db6fe4256f added shortcuts to manifest 2021-01-10 10:27:50 +01:00
vabene1111
8a73f018f0 Merge pull request #326 from bloomcake/boomark-unique
Unique constraint on RecipeBookEntry
2021-01-09 23:27:40 +01:00
vabene1111
b93b16d6eb save WIP
not really getting the feel for this, will continue later, need to really learn how this works
2021-01-09 23:27:25 +01:00
vabene1111
6acf4bb831 Revert "temp save vue transition stuff"
This reverts commit 976cedd536.
2021-01-09 23:11:37 +01:00
Tobias Lindenberg
86134eecb4 added unique constraint on RecipeBookEntry table
Signed-off-by: Tobias Lindenberg <tobias@lindenberg.pm>
2021-01-09 22:17:56 +01:00
vabene1111
3716e2bb0f Merge pull request #324 from Hanser/manifest
added webmanifest to improve mobile (shortcut) experience
2021-01-09 09:16:34 +01:00
Johannes Stefan
b5e08a4828 added webmanifest to static files to improve mobile (shortcut) experience 2021-01-09 00:19:09 +01:00
vabene1111
976cedd536 temp save vue transition stuff 2021-01-08 22:31:48 +01:00
vabene1111
4af5a4e96e testing vue stuff 2021-01-08 00:14:31 +01:00
vabene1111
9044f9e1ff testing with vue mixings and components 2021-01-07 23:58:04 +01:00
vabene1111
4b719af4e1 fixed broken microdata blowing up ingredient lists 2021-01-07 23:09:37 +01:00
vabene1111
78fa5338d3 fixed ingredient dropping on parser fail 2021-01-07 22:56:05 +01:00
vabene1111
e9f2b875b9 formatting 2021-01-07 22:47:53 +01:00
vabene1111
fe3f817bc5 Merge pull request #322 from jakobwenzel/fixIngredientParser
Fix ingredient parser to allow Plural-suffixes
2021-01-07 22:35:48 +01:00
vabene1111
32f5cf64e5 stick navbar .env 2021-01-07 22:33:31 +01:00
vabene1111
5aadb66013 Merge pull request #321 from neferin12/develop
Sticky Navbar
2021-01-07 22:29:54 +01:00
Julian Pollinger
6225648e3a Minor formatting 2021-01-07 21:50:26 +01:00
Jakob Wenzel
29903af085 catch error when trying to parse into ingredient/note 2021-01-07 19:49:02 +01:00
Jakob Wenzel
8ed2562454 allow plural-suffixes in ingredient parser 2021-01-07 19:30:07 +01:00
Jakob Wenzel
fd255fd6ad added failing testcase for ingredient parser 2021-01-07 19:20:20 +01:00
Jakob Wenzel
8931fa8557 fix ingredient parser testcase
* call correct function
* flip assertion
2021-01-07 19:06:08 +01:00
Julian Pollinger
251bd88f70 Make the sticky navbar an option 2021-01-07 18:49:11 +01:00
vabene1111
2ac076afa5 readme and documentation 2021-01-07 16:45:01 +01:00
vabene1111
2d82fc1ddd fixed meal plan settings cookie expiring 2021-01-07 15:42:34 +01:00
vabene1111
ba9d85dfc9 updated docker configs 2021-01-07 15:24:56 +01:00
vabene1111
c752b2e81b Merge pull request #316 from KyleWJohnston/develop
Improve documentation formatting
2021-01-07 09:25:23 +01:00
Julian Pollinger
19df1cf65d Sticky Navbar 2021-01-06 19:09:41 +01:00
Julian Pollinger
ebdd8fc053 Update base.html 2021-01-06 18:57:25 +01:00
Kyle Johnston
924576c8ba Correct mistake on ports, clarify documentation
My understanding is if you want to access the app on port 3000, you
would use `docker run -d -p 3000:8080 ...` for a Docker command. For
Docker Compose, it's:
```
nginx_recipes:
  ports:
  - 3000:80
```
2021-01-06 07:30:10 -05:00
vabene1111
f4fa28bfbc Merge pull request #318 from vabene1111/dependabot/pip/jinja2-2.11.2
Bump jinja2 from 2.11.0 to 2.11.2
2021-01-06 07:54:35 +01:00
dependabot[bot]
0c2cb599ba Bump jinja2 from 2.11.0 to 2.11.2
Bumps [jinja2](https://github.com/pallets/jinja) from 2.11.0 to 2.11.2.
- [Release notes](https://github.com/pallets/jinja/releases)
- [Changelog](https://github.com/pallets/jinja/blob/master/CHANGES.rst)
- [Commits](https://github.com/pallets/jinja/compare/2.11.0...2.11.2)

Signed-off-by: dependabot[bot] <support@github.com>
2021-01-06 06:03:30 +00:00
Kyle Johnston
54f85196e7 Fix Docker install instructions
Not having the backslashes for the `docker run` command resulted in an
error.

Using `80:80` is ignored. While it will work on port 80, it fails when
using any other port such as `3000:80`. Using `3000:8080` works.

Volumes should have a colon on the end, otherwise you get a `ERROR:
yaml.scanner.ScannerError: mapping values are not allowed here`

That said, the new Docker install isn't working for me yet, but I love
the idea of bundling the nginx files with the recipes container.
2021-01-05 21:50:56 -05:00
Kyle Johnston
a1093ed918 Fix documentation formatting
Mostly just typos and some minor changes to help new users less familiar
with Docker tools. I preserved the original style as much as possible.
2021-01-05 21:19:16 -05:00
vabene1111
caa33810c4 added more documentation 2021-01-06 00:17:53 +01:00
vabene1111
fd8229684c improved docs and added unraid 2021-01-05 23:41:15 +01:00
vabene1111
320d94a223 fixed incorrect redirects for unauthenticated users 2021-01-05 23:24:58 +01:00
vabene1111
43ccc351c7 added changes typo fix 2021-01-05 22:54:57 +01:00
vabene1111
d36e4c6e0a fixed another typoe 2021-01-05 22:54:46 +01:00
vabene1111
fdeede5717 updated vue and vue bootrap + template improvements 2021-01-05 22:53:08 +01:00
vabene1111
738b601462 templating working 2021-01-05 22:07:46 +01:00
vabene1111
2c93a2f177 Merge branch 'develop' into feature/templating 2021-01-05 21:48:50 +01:00
vabene1111
6b2d164585 fixed broken import chain 2021-01-05 21:48:44 +01:00
vabene1111
ee707eba5c super basic templating working 2021-01-05 21:46:24 +01:00
vabene1111
f26b09cc0a fixed broken translations in help_texts 2021-01-05 21:26:42 +01:00
vabene1111
4e88f846af Merge pull request #312 from vabene1111/translations_cookbook-locale-en-lc-messages-django-po--develop_it
Translate '/cookbook/locale/en/LC_MESSAGES/django.po' in 'it'
2021-01-05 13:11:08 +01:00
transifex-integration[bot]
6a1d892e8b Apply translations in it
translation completed for the source file '/cookbook/locale/en/LC_MESSAGES/django.po'
on the 'it' language.
2021-01-05 11:44:52 +00:00
vabene1111
b90c70b2a3 huge documentation and setup restructure 2021-01-05 10:38:18 +01:00
vabene1111
bcf50f30bc Merge pull request #311 from vabene1111/dependabot/pip/django-3.1.5
Bump django from 3.1.4 to 3.1.5
2021-01-05 08:13:00 +01:00
dependabot[bot]
065ed6c437 Bump django from 3.1.4 to 3.1.5
Bumps [django](https://github.com/django/django) from 3.1.4 to 3.1.5.
- [Release notes](https://github.com/django/django/releases)
- [Commits](https://github.com/django/django/compare/3.1.4...3.1.5)

Signed-off-by: dependabot[bot] <support@github.com>
2021-01-05 06:24:30 +00:00
vabene1111
285e09f40a moved config again 2021-01-05 00:31:48 +01:00
vabene1111
0398f36949 removed ngxinx from ignored directories 2021-01-05 00:19:14 +01:00
vabene1111
ea30eb96cd changed up structure again 2021-01-04 23:40:58 +01:00
vabene1111
b787ae49bb another way of doing it 2021-01-04 23:12:01 +01:00
vabene1111
f8e2283a69 testing automatic creation of nginx config dir 2021-01-04 22:50:07 +01:00
vabene1111
13d51a7b46 further testing of nginx configurations 2021-01-04 22:31:48 +01:00
vabene1111
e74ae06b64 testing nginx configuration 2021-01-04 22:30:03 +01:00
vabene1111
aa495250c9 further work on documentation 2021-01-04 09:41:26 +01:00
vabene1111
f8ee48c23b mkdocs settings 2021-01-04 08:38:57 +01:00
vabene1111
320246b18b Merge pull request #309 from vabene1111/dependabot/pip/pillow-8.1.0
Bump pillow from 8.0.1 to 8.1.0
2021-01-04 08:32:26 +01:00
dependabot[bot]
00992da998 Bump pillow from 8.0.1 to 8.1.0
Bumps [pillow](https://github.com/python-pillow/Pillow) from 8.0.1 to 8.1.0.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/master/CHANGES.rst)
- [Commits](https://github.com/python-pillow/Pillow/compare/8.0.1...8.1.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-01-04 07:22:34 +00:00
vabene1111
2b9ad2feed removed fixture based backup
many different things can lead to this method of backing up failing both on backup and on restore.
to not give the user a false sense of security this feature was removed for the time being.
once i have time i will add a proper backup system.
2021-01-04 00:30:39 +01:00
vabene1111
257127bd4e ... 2021-01-03 10:34:14 +01:00
vabene1111
b1df118140 testing another action 2021-01-03 10:26:29 +01:00
vabene1111
da6b437b20 further testing 2021-01-03 10:19:32 +01:00
vabene1111
6fe4c79b0d testing with mkdocs 2021-01-03 10:08:54 +01:00
vabene1111
1793753cb4 different action to include theme 2021-01-03 10:05:30 +01:00
vabene1111
9ed1aff0d2 theme and name for mkdocs 2021-01-03 10:01:51 +01:00
vabene1111
51c3ec5762 added doc name 2021-01-03 09:58:12 +01:00
vabene1111
5feeabb498 mk docs 2021-01-03 09:57:15 +01:00
vabene1111
c4aa3eb019 test navigation 2021-01-03 09:49:17 +01:00
vabene1111
e8b9f473a6 testing around with github pages 2021-01-03 09:47:57 +01:00
vabene1111
279b4dc025 testing GH pages 2021-01-03 09:35:49 +01:00
vabene1111
6a1226ca26 updated contributers 2021-01-01 21:18:50 +01:00
vabene1111
b9ee7d53fa Merge pull request #299 from melkypie/locale-lv
Add latvian language
2021-01-01 20:59:11 +01:00
melkypie
ace7ee4274 Add latvian language 2020-12-31 18:47:07 +02:00
vabene1111
16968db1cf Update README.md 2020-12-31 13:41:47 +01:00
vabene1111
2b24155dd2 emoji updated 2020-12-31 13:39:10 +01:00
vabene1111
5a7c914fe7 added lots of user information 2020-12-31 13:38:16 +01:00
vabene1111
f822e03be0 Create SECURITY.md 2020-12-31 13:11:00 +01:00
vabene1111
1bdf14dbf9 made and compiled messages + fixed lots of typos 2020-12-31 12:56:18 +01:00
vabene1111
6ef173d82d fixed and cleand up a lot of servings related stuff 2020-12-31 12:44:19 +01:00
vabene1111
1e471ad40d removed all trans tags from javascript code
replaced by django recommended javascript catalog
still need to sort out the different translation domains
2020-12-31 12:30:31 +01:00
vabene1111
4ff1a6bc93 Merge pull request #297 from lipschultz/created-by
Assign authenticated user to created_by
2020-12-31 12:16:16 +01:00
vabene1111
7d1f47edc5 temporary fix for javascript translation 2020-12-30 17:00:38 +01:00
vabene1111
f69d7898d5 Merge pull request #290 from vabene1111/translations_cookbook-locale-en-lc-messages-django-po--develop_es
Translate '/cookbook/locale/en/LC_MESSAGES/django.po' in 'es'
2020-12-30 11:20:32 +01:00
transifex-integration[bot]
9692e2386b Apply translations in es
translation completed for the source file '/cookbook/locale/en/LC_MESSAGES/django.po'
on the 'es' language.
2020-12-28 13:34:59 +00:00
vabene1111
93b2e2d7e4 fixed small issues 2020-12-28 14:18:51 +01:00
vabene1111
8b2833f353 re added stuff 2020-12-28 14:14:34 +01:00
vabene1111
643dbbc294 Merge pull request #58 from tourn/recipe-serving-count
Add serving count to recipe
2020-12-28 10:20:00 +01:00
vabene1111
c4273a4c3f Merge branch 'develop' into recipe-serving-count 2020-12-28 10:19:52 +01:00
vabene1111
95461316a5 prevent creation of empty string units 2020-12-27 23:12:24 +01:00
vabene1111
1775b64ba4 better migration for unit fix 2020-12-27 23:10:22 +01:00
vabene1111
5a9270373f Merge branch 'translations_cookbook-locale-en-lc-messages-django-po--develop_it' into develop
# Conflicts:
#	cookbook/locale/it/LC_MESSAGES/django.po
2020-12-27 16:57:35 +01:00
transifex-integration[bot]
37f98ce9fe Apply translations in it
translation completed for the source file '/cookbook/locale/en/LC_MESSAGES/django.po'
on the 'it' language.
2020-12-27 12:46:39 +00:00
vabene1111
fa556c9a7f added migration to fix emtpy units
set all units to none for all recipes containing empty named units and delete them
2020-12-26 17:20:17 +01:00
vabene1111
29e1d1286c fixed importer empty units 2020-12-26 15:17:37 +01:00
Michael Lipschultz
f489043077 Assign authenticated user to created_by 2020-12-26 09:09:47 -05:00
vabene1111
bdd004518c verified and updated importer tests 2020-12-26 14:50:54 +01:00
vabene1111
840f5ec60d added ingredient parser test 2020-12-26 13:57:51 +01:00
vabene1111
566eea1d75 Merge pull request #277 from l0c4lh057/master
Improve text to ingredient parsing
2020-12-26 13:52:24 +01:00
vabene1111
bb48655acb Merge pull request #279 from l0c4lh057/improve
Minor improvements
2020-12-26 13:48:54 +01:00
vabene1111
d723165b1c updated base translations 2020-12-26 13:48:33 +01:00
vabene1111
592bd4f11e fixed some english translations 2020-12-26 13:46:55 +01:00
vabene1111
0aec23fcdd added tests for recipe view permissions 2020-12-26 13:28:49 +01:00
vabene1111
a23dc717aa added new languages 2020-12-26 13:16:01 +01:00
vabene1111
d364994ed7 compiled messages 2020-12-26 13:14:36 +01:00
vabene1111
a38ed28512 Merge pull request #280 from vabene1111/translations_cookbook-locale-en-lc-messages-django-po--develop_nl
Translate '/cookbook/locale/en/LC_MESSAGES/django.po' in 'nl'
2020-12-26 10:52:56 +01:00
vabene1111
1f5c02bcc3 Merge branch 'develop' into translations_cookbook-locale-en-lc-messages-django-po--develop_nl 2020-12-26 10:52:27 +01:00
vabene1111
f4afdfbc07 Merge pull request #288 from vabene1111/translations_cookbook-locale-en-lc-messages-django-po--develop_es
Translate '/cookbook/locale/en/LC_MESSAGES/django.po' in 'es'
2020-12-26 10:47:51 +01:00
transifex-integration[bot]
f753b63b13 Apply translations in es
translation completed for the source file '/cookbook/locale/en/LC_MESSAGES/django.po'
on the 'es' language.
2020-12-25 22:47:41 +00:00
tourn
6f3068a28c Show default serving count in meal planner 2020-12-24 11:51:51 +01:00
tourn
aa57b47d18 Use correct serving count from recipe view -> add to shopping 2020-12-24 11:28:59 +01:00
tourn
113e9ef1e3 Merge remote-tracking branch 'upstream/develop' into recipe-serving-count 2020-12-24 11:17:56 +01:00
transifex-integration[bot]
5899527621 Apply translations in nl
translation completed for the source file '/cookbook/locale/en/LC_MESSAGES/django.po'
on the 'nl' language.
2020-12-23 15:13:42 +00:00
Aaron
0a40de0f14 Add min/max to servings spinner 2020-12-22 23:52:40 +01:00
Aaron
bc31f013c0 Fix 'All Keywords' label in website import 2020-12-22 23:51:55 +01:00
Aaron
e7fc15dc72 Show advanced search again if it was used 2020-12-22 23:50:59 +01:00
Aaron
79396cec9e switch from double to single quotes 2020-12-21 22:42:27 +01:00
Aaron
5e07c6130f Switch to 4-space indentation 2020-12-21 20:14:32 +01:00
Aaron
94e1fdfbff Improve text to ingredient parsing
The previous implementation of parsing ingredients was very simple. I now wrote a parser
that I would consider good. It takes care of several edge cases and notations.

- Supports fraction unicode (½, ¼, ⅜, ...)
- Supports notations like `1½` and `1 1/2`
- Supports unit directly after the amount without space inbetween (`2g`, `2½g`)
- Supports notes (`5g onion (cubed)` -> amount: 5, unit: g, ingredient: onion, note: cubed)
- Supports notes (`5g onion, cubed` -> amount: 5, unit: g, ingredient: onion, note: cubed)
- Does not break when both commas and brackets exist
2020-12-21 20:00:46 +01:00
vabene1111
a0d414c83f Merge pull request #267 from Nailik/patch-1
Update Synology Setup Readme
2020-12-18 20:16:41 +01:00
Nailik
1441368465 Update Synology Setup Readme
Fixed env folder to .env folder and added instruction to set postgres password

Added information how to setup ssl and a task to update ssl certificate when needed
2020-12-18 16:32:34 +01:00
vabene1111
6f301c4771 Merge pull request #264 from vabene1111/translations_cookbook-locale-en-lc-messages-django-po--develop_it
Translate '/cookbook/locale/en/LC_MESSAGES/django.po' in 'it'
2020-12-18 14:01:08 +01:00
transifex-integration[bot]
ec31d251ea Apply translations in it
translation completed for the source file '/cookbook/locale/en/LC_MESSAGES/django.po'
on the 'it' language.
2020-12-18 12:09:20 +00:00
vabene1111
289625923f Merge pull request #261 from vabene1111/dependabot/pip/requests-2.25.1
Bump requests from 2.25.0 to 2.25.1
2020-12-17 09:36:47 +01:00
dependabot[bot]
a42a76a2cf Bump requests from 2.25.0 to 2.25.1
Bumps [requests](https://github.com/psf/requests) from 2.25.0 to 2.25.1.
- [Release notes](https://github.com/psf/requests/releases)
- [Changelog](https://github.com/psf/requests/blob/master/HISTORY.md)
- [Commits](https://github.com/psf/requests/compare/v2.25.0...v2.25.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-17 06:23:09 +00:00
vabene1111
fd1216cd22 Merge pull request #259 from vabene1111/translations_cookbook-locale-en-lc-messages-django-po--develop_fr
Translate '/cookbook/locale/en/LC_MESSAGES/django.po' in 'fr'
2020-12-16 15:49:05 +01:00
transifex-integration[bot]
3f6a342026 Apply translations in fr
translation completed for the source file '/cookbook/locale/en/LC_MESSAGES/django.po'
on the 'fr' language.
2020-12-16 14:47:47 +00:00
vabene1111
f72fc699f8 fixed import image error 2020-12-15 22:54:10 +01:00
vabene1111
cdcca80196 Merge pull request #252 from vabene1111/dependabot/pip/django-cleanup-5.1.0
Bump django-cleanup from 4.0.0 to 5.1.0
2020-12-15 22:44:08 +01:00
vabene1111
400cd2f6a0 Merge pull request #251 from vabene1111/dependabot/pip/djangorestframework-3.12.2
Bump djangorestframework from 3.11.0 to 3.12.2
2020-12-15 22:44:02 +01:00
dependabot[bot]
37a4821d01 Bump django-cleanup from 4.0.0 to 5.1.0
Bumps [django-cleanup](https://github.com/un1t/django-cleanup) from 4.0.0 to 5.1.0.
- [Release notes](https://github.com/un1t/django-cleanup/releases)
- [Changelog](https://github.com/un1t/django-cleanup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/un1t/django-cleanup/compare/4.0.0...5.1.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-15 21:44:00 +00:00
vabene1111
d165075a96 Merge pull request #250 from vabene1111/dependabot/pip/django-crispy-forms-1.10.0
Bump django-crispy-forms from 1.9.1 to 1.10.0
2020-12-15 22:43:38 +01:00
vabene1111
a062173ebd Merge pull request #249 from vabene1111/dependabot/pip/django-3.1.4
Bump django from 3.1.3 to 3.1.4
2020-12-15 22:43:31 +01:00
vabene1111
806963c396 Merge pull request #248 from vabene1111/dependabot/pip/icalendar-4.0.7
Bump icalendar from 4.0.6 to 4.0.7
2020-12-15 22:42:44 +01:00
vabene1111
851853740d added catalan language chooser 2020-12-15 22:19:36 +01:00
vabene1111
7ca88f3c0a fixed scaling for fractions 2020-12-15 22:16:15 +01:00
vabene1111
ac2e9dd6cb updated german translation 2020-12-15 22:04:40 +01:00
vabene1111
b2a34ce59a Merge pull request #255 from vabene1111/translations_cookbook-locale-en-lc-messages-django-po--develop_de
Translate '/cookbook/locale/en/LC_MESSAGES/django.po' in 'de'
2020-12-15 22:04:12 +01:00
transifex-integration[bot]
6124501f5a Apply translations in de
translation completed for the source file '/cookbook/locale/en/LC_MESSAGES/django.po'
on the 'de' language.
2020-12-15 21:03:40 +00:00
vabene1111
4ec313f752 fixed another importer issue 2020-12-15 21:59:34 +01:00
vabene1111
dd07c56ede fixed issue with new fraction importer 2020-12-15 21:52:56 +01:00
vabene1111
77fae46aee translation updates 2020-12-15 21:39:42 +01:00
vabene1111
ff573b0358 Merge pull request #254 from vabene1111/translations_cookbook-locale-en-lc-messages-django-po--develop_ca
Translate '/cookbook/locale/en/LC_MESSAGES/django.po' in 'ca'
2020-12-15 13:02:52 +01:00
transifex-integration[bot]
247eab2a4f Apply translations in ca
translation completed for the source file '/cookbook/locale/en/LC_MESSAGES/django.po'
on the 'ca' language.
2020-12-15 12:00:28 +00:00
dependabot[bot]
dc46502667 Bump djangorestframework from 3.11.0 to 3.12.2
Bumps [djangorestframework](https://github.com/encode/django-rest-framework) from 3.11.0 to 3.12.2.
- [Release notes](https://github.com/encode/django-rest-framework/releases)
- [Commits](https://github.com/encode/django-rest-framework/compare/3.11.0...3.12.2)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-15 06:28:44 +00:00
dependabot[bot]
ac58f1959d Bump django-crispy-forms from 1.9.1 to 1.10.0
Bumps [django-crispy-forms](https://github.com/django-crispy-forms/django-crispy-forms) from 1.9.1 to 1.10.0.
- [Release notes](https://github.com/django-crispy-forms/django-crispy-forms/releases)
- [Changelog](https://github.com/django-crispy-forms/django-crispy-forms/blob/master/CHANGELOG.md)
- [Commits](https://github.com/django-crispy-forms/django-crispy-forms/compare/1.9.1...1.10.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-15 06:28:43 +00:00
dependabot[bot]
f4543f8d65 Bump django from 3.1.3 to 3.1.4
Bumps [django](https://github.com/django/django) from 3.1.3 to 3.1.4.
- [Release notes](https://github.com/django/django/releases)
- [Commits](https://github.com/django/django/compare/3.1.3...3.1.4)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-15 06:28:42 +00:00
dependabot[bot]
d0ef5e27df Bump icalendar from 4.0.6 to 4.0.7
Bumps [icalendar](https://github.com/collective/icalendar) from 4.0.6 to 4.0.7.
- [Release notes](https://github.com/collective/icalendar/releases)
- [Changelog](https://github.com/collective/icalendar/blob/master/CHANGES.rst)
- [Commits](https://github.com/collective/icalendar/compare/4.0.6...4.0.7)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-15 06:28:41 +00:00
vabene1111
9ea90f1c87 fraction import 2020-12-14 19:56:21 +01:00
vabene1111
e7922a7e47 nutirtion fix 2020-12-14 19:12:01 +01:00
vabene1111
d3bc440c83 meal plan quality of life stuff 2020-12-14 17:37:51 +01:00
vabene1111
910b28fe2d meal plan date handling rewrite 2020-12-14 17:11:40 +01:00
vabene1111
89cd8bc2d2 fixed wrong translation 2020-12-14 15:49:32 +01:00
vabene1111
d2e9ad2ae6 requirement still needed 2020-12-14 15:14:55 +01:00
vabene1111
56c9edd328 removed deprecated psycopg2 2020-12-14 15:11:41 +01:00
vabene1111
7732aa7646 added support for fractions 2020-12-14 14:08:11 +01:00
vabene1111
9863447bac small nutrition fixes 2020-12-14 12:56:18 +01:00
vabene1111
53b00cc4c8 Merge pull request #199 from sebimarkgraf/feature/nutrition
Add nutritional values
2020-12-14 12:29:56 +01:00
vabene1111
4f34ec1be8 Merge pull request #235 from vabene1111/dependabot/pip/pillow-8.0.1
Bump pillow from 7.1.2 to 8.0.1
2020-12-14 12:08:48 +01:00
dependabot[bot]
e444ba91f0 Bump pillow from 7.1.2 to 8.0.1
Bumps [pillow](https://github.com/python-pillow/Pillow) from 7.1.2 to 8.0.1.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/master/CHANGES.rst)
- [Commits](https://github.com/python-pillow/Pillow/compare/7.1.2...8.0.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-14 11:08:35 +00:00
vabene1111
fa3513eb65 Merge pull request #234 from vabene1111/dependabot/pip/webdavclient3-3.14.5
Bump webdavclient3 from 3.14.4 to 3.14.5
2020-12-14 12:08:29 +01:00
vabene1111
d323778f1d Merge pull request #232 from vabene1111/dependabot/pip/django-autocomplete-light-3.8.1
Bump django-autocomplete-light from 3.5.1 to 3.8.1
2020-12-14 12:08:14 +01:00
vabene1111
53cb5afef6 Merge pull request #236 from vabene1111/dependabot/pip/beautifulsoup4-4.9.3
Bump beautifulsoup4 from 4.9.2 to 4.9.3
2020-12-14 12:07:37 +01:00
vabene1111
0349301919 Merge pull request #242 from vabene1111/dependabot/pip/lxml-4.6.2
Bump lxml from 4.5.1 to 4.6.2
2020-12-14 12:07:24 +01:00
vabene1111
a5d2bd75d6 recompiled messages + added timezone setting 2020-12-14 12:03:43 +01:00
vabene1111
26499ad431 Merge pull request #229 from sebimarkgraf/fix/225-random-button
Include random in filtermixin
2020-12-14 11:51:59 +01:00
dependabot[bot]
2eb72953f0 Bump lxml from 4.5.1 to 4.6.2
Bumps [lxml](https://github.com/lxml/lxml) from 4.5.1 to 4.6.2.
- [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.5.1...lxml-4.6.2)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-30 07:22:55 +00:00
tourn
6fd9cf0d8c Use serving count in shopping list 2020-11-20 15:22:58 +01:00
tourn
1e800889e4 Merge remote-tracking branch 'upstream/master' into recipe-serving-count 2020-11-20 14:44:09 +01:00
Sebastian Markgraf
422113a745 Finish editing of nutritional information 2020-11-17 22:27:01 +01:00
dependabot[bot]
e687d0e569 Bump beautifulsoup4 from 4.9.2 to 4.9.3
Bumps [beautifulsoup4](http://www.crummy.com/software/BeautifulSoup/bs4/) from 4.9.2 to 4.9.3.

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-16 07:19:43 +00:00
dependabot[bot]
76c1529ec1 Bump webdavclient3 from 3.14.4 to 3.14.5
Bumps [webdavclient3](https://github.com/ezhov-evgeny/webdav-client-python-3) from 3.14.4 to 3.14.5.
- [Release notes](https://github.com/ezhov-evgeny/webdav-client-python-3/releases)
- [Changelog](https://github.com/ezhov-evgeny/webdav-client-python-3/blob/develop/RELEASE_NOTES.md)
- [Commits](https://github.com/ezhov-evgeny/webdav-client-python-3/compare/v3.14.4...v3.14.5)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-16 07:19:41 +00:00
dependabot[bot]
d30b2b7ec8 Bump django-autocomplete-light from 3.5.1 to 3.8.1
Bumps [django-autocomplete-light](https://github.com/yourlabs/django-autocomplete-light) from 3.5.1 to 3.8.1.
- [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.5.1...3.8.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-16 07:19:35 +00:00
Sebastian Markgraf
c4fbad614e Include random in filtermixin 2020-11-14 20:20:30 +01:00
vabene1111
4c92a4b39c fixed shopping list recipe search 2020-11-14 11:20:43 +01:00
vabene1111
3dad5132bb Merge pull request #219 from vabene1111/dependabot/pip/markdown-3.3.3
Bump markdown from 3.2.2 to 3.3.3
2020-11-14 11:16:55 +01:00
vabene1111
7d7890445e Merge pull request #220 from vabene1111/dependabot/pip/django-3.1.3
Bump django from 3.1.1 to 3.1.3
2020-11-14 11:16:49 +01:00
vabene1111
cea015f23d Merge pull request #221 from vabene1111/dependabot/pip/drf-writable-nested-0.6.2
Bump drf-writable-nested from 0.6.1 to 0.6.2
2020-11-14 11:16:43 +01:00
vabene1111
3e8610912e Merge pull request #223 from vabene1111/dependabot/pip/django-tables2-2.3.3
Bump django-tables2 from 2.3.1 to 2.3.3
2020-11-14 11:16:38 +01:00
vabene1111
ba80ca42e6 Merge pull request #226 from vabene1111/dependabot/pip/requests-2.25.0
Bump requests from 2.23.0 to 2.25.0
2020-11-14 11:16:32 +01:00
vabene1111
c413db5460 fixed english typo 2020-11-14 11:16:01 +01:00
vabene1111
0e319ff293 fixed typo in german transaltion 2020-11-14 11:15:21 +01:00
vabene1111
88e3b22dcd Merge pull request #228 from vabene1111/translations_cookbook-locale-en-lc-messages-django-po--develop_nl
Translate '/cookbook/locale/en/LC_MESSAGES/django.po' in 'nl'
2020-11-14 11:02:53 +01:00
transifex-integration[bot]
19e2094ecd Apply translations in nl
translation completed for the source file '/cookbook/locale/en/LC_MESSAGES/django.po'
on the 'nl' language.
2020-11-13 22:21:02 +00:00
dependabot[bot]
215989682b Bump requests from 2.23.0 to 2.25.0
Bumps [requests](https://github.com/psf/requests) from 2.23.0 to 2.25.0.
- [Release notes](https://github.com/psf/requests/releases)
- [Changelog](https://github.com/psf/requests/blob/master/HISTORY.md)
- [Commits](https://github.com/psf/requests/compare/v2.23.0...v2.25.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-12 06:37:40 +00:00
Sebastian Markgraf
2f038edf8c Fix missing string literals for translations. 2020-11-06 17:24:20 +01:00
Sebastian Markgraf
a754002f4e Revert approach to fixed nutritional values. 2020-11-06 17:22:21 +01:00
dependabot[bot]
1af2211010 Bump django-tables2 from 2.3.1 to 2.3.3
Bumps [django-tables2](https://github.com/jieter/django-tables2) from 2.3.1 to 2.3.3.
- [Release notes](https://github.com/jieter/django-tables2/releases)
- [Changelog](https://github.com/jieter/django-tables2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jieter/django-tables2/compare/v2.3.1...v2.3.3)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-05 06:32:16 +00:00
dependabot[bot]
724d57ecd7 Bump django from 3.1.1 to 3.1.3
Bumps [django](https://github.com/django/django) from 3.1.1 to 3.1.3.
- [Release notes](https://github.com/django/django/releases)
- [Commits](https://github.com/django/django/compare/3.1.1...3.1.3)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-05 06:32:15 +00:00
dependabot[bot]
4b04fada51 Bump drf-writable-nested from 0.6.1 to 0.6.2
Bumps [drf-writable-nested](https://github.com/beda-software/drf-writable-nested) from 0.6.1 to 0.6.2.
- [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.1...v0.6.2)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-05 06:32:15 +00:00
dependabot[bot]
4ad7043f91 Bump markdown from 3.2.2 to 3.3.3
Bumps [markdown](https://github.com/Python-Markdown/markdown) from 3.2.2 to 3.3.3.
- [Release notes](https://github.com/Python-Markdown/markdown/releases)
- [Commits](https://github.com/Python-Markdown/markdown/compare/3.2.2...3.3.3)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-05 06:32:13 +00:00
vabene1111
4dfda4439c re added standard filter to recipe api 2020-11-04 16:53:49 +01:00
vabene1111
591d185b9d improved random recipe queryset function 2020-11-04 15:09:35 +01:00
vabene1111
8d582548bd Merge pull request #213 from tourn/random-recipes2
Show random recipes in meal planner
2020-11-04 15:06:50 +01:00
vabene1111
209924e5b3 Merge pull request #191 from vabene1111/dependabot/pip/psycopg2-binary-2.8.6
Bump psycopg2-binary from 2.8.5 to 2.8.6
2020-11-04 15:01:52 +01:00
dependabot[bot]
7e3e2aadaf Bump psycopg2-binary from 2.8.5 to 2.8.6
Bumps [psycopg2-binary](https://github.com/psycopg/psycopg2) from 2.8.5 to 2.8.6.
- [Release notes](https://github.com/psycopg/psycopg2/releases)
- [Changelog](https://github.com/psycopg/psycopg2/blob/master/NEWS)
- [Commits](https://github.com/psycopg/psycopg2/commits)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-04 14:01:23 +00:00
vabene1111
0930e615f0 Merge pull request #192 from vabene1111/dependabot/pip/simplejson-3.17.2
Bump simplejson from 3.17.0 to 3.17.2
2020-11-04 15:00:59 +01:00
vabene1111
21c759b127 Merge pull request #193 from vabene1111/dependabot/pip/whitenoise-5.2.0
Bump whitenoise from 5.1.0 to 5.2.0
2020-11-04 15:00:46 +01:00
vabene1111
7d1a83440d Merge pull request #195 from vabene1111/dependabot/pip/bleach-3.2.1
Bump bleach from 3.1.5 to 3.2.1
2020-11-04 15:00:37 +01:00
vabene1111
2d75b303fd Merge pull request #210 from vabene1111/dependabot/pip/python-dotenv-0.15.0
Bump python-dotenv from 0.13.0 to 0.15.0
2020-11-04 15:00:26 +01:00
vabene1111
a1b15d46b8 fixed note only meal plan entries not working 2020-11-04 14:58:31 +01:00
tourn
69a6edee99 Show random recipes in meal planner 2020-11-03 16:46:31 +01:00
vabene1111
0ac23b4e3a Merge pull request #211 from Tmaxxrox97/develop
Username field consistency
2020-10-29 17:00:27 +01:00
Tmaxxrox97
085e777ee0 Changed Username field label from "Name" to "Username" 2020-10-29 09:52:05 -05:00
Tmaxxrox97
c31df3f7a6 Merge pull request #1 from vabene1111/develop
Update repo
2020-10-29 07:58:32 -05:00
dependabot[bot]
98e2c0acaf Bump python-dotenv from 0.13.0 to 0.15.0
Bumps [python-dotenv](https://github.com/theskumar/python-dotenv) from 0.13.0 to 0.15.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.13.0...v0.15.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-29 06:36:05 +00:00
vabene1111
1509b8243b Update docker-publish-release.yml 2020-10-24 17:19:23 +02:00
vabene1111
e427d8b714 donst export checked items 2020-10-21 20:35:26 +02:00
vabene1111
89b8dbe57f added online check to prevent message spam 2020-10-20 23:08:30 +02:00
vabene1111
f2a17fe3bb fixed shopping list GET param regex 2020-10-20 22:51:19 +02:00
vabene1111
14e0dae6e3 compiled translations 2020-10-20 21:23:37 +02:00
vabene1111
733c281dc8 Merge pull request #200 from vabene1111/translations_cookbook-locale-en-lc-messages-django-po--develop_de
Translate '/cookbook/locale/en/LC_MESSAGES/django.po' in 'de'
2020-10-20 21:22:36 +02:00
transifex-integration[bot]
c542f3154e Apply translations in de
translation completed for the source file '/cookbook/locale/en/LC_MESSAGES/django.po'
on the 'de' language.
2020-10-20 19:22:06 +00:00
vabene1111
c6f40db7e3 shopping list tweaks 2020-10-20 20:54:15 +02:00
Sebastian Markgraf
31dabd4757 Add nutritions output 2020-10-18 17:31:56 +02:00
Sebastian Markgraf
7a89015ac5 Add migrations. 2020-10-16 23:59:19 +02:00
Sebastian Markgraf
2b1cde2efc Add basic output for nutritions. 2020-10-16 23:44:18 +02:00
vabene1111
cb3b8c931e fixed broken defautl share 2020-10-16 00:11:41 +02:00
vabene1111
72bea14c3a added sharing 2020-10-16 00:01:14 +02:00
vabene1111
cd46203d55 added permission classes for sharing + tests 2020-10-15 23:41:38 +02:00
Sebastian Markgraf
368d631602 Add nutrition to model. 2020-10-15 22:03:25 +02:00
vabene1111
5c1cecb7e7 fixed saving null units 2020-10-15 21:37:15 +02:00
vabene1111
526cf13b8d increased max text area size of instructions 2020-10-15 21:27:41 +02:00
vabene1111
3c21baf876 fixed create shopping list from recipe 2020-10-15 21:26:24 +02:00
vabene1111
2d2c38517c fixed null units breaking shopping lists 2020-10-15 21:19:49 +02:00
vabene1111
163b259bd1 fixed migrations for postgres 2020-10-14 22:05:49 +02:00
dependabot[bot]
24ced66c69 Bump bleach from 3.1.5 to 3.2.1
Bumps [bleach](https://github.com/mozilla/bleach) from 3.1.5 to 3.2.1.
- [Release notes](https://github.com/mozilla/bleach/releases)
- [Changelog](https://github.com/mozilla/bleach/blob/master/CHANGES)
- [Commits](https://github.com/mozilla/bleach/compare/v3.1.5...v3.2.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-30 06:25:32 +00:00
dependabot[bot]
6c1982cccb Bump simplejson from 3.17.0 to 3.17.2
Bumps [simplejson](https://github.com/simplejson/simplejson) from 3.17.0 to 3.17.2.
- [Release notes](https://github.com/simplejson/simplejson/releases)
- [Changelog](https://github.com/simplejson/simplejson/blob/master/CHANGES.txt)
- [Commits](https://github.com/simplejson/simplejson/compare/v3.17.0...v3.17.2)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-30 06:25:31 +00:00
dependabot[bot]
3bae7283d1 Bump whitenoise from 5.1.0 to 5.2.0
Bumps [whitenoise](https://github.com/evansd/whitenoise) from 5.1.0 to 5.2.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.1.0...v5.2.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-30 06:25:31 +00:00
vabene1111
0b458f7565 update source file as well 2020-09-29 19:44:46 +02:00
vabene1111
675f30126c updated base translation files 2020-09-29 19:38:58 +02:00
vabene1111
25b051323c shopping list basic sorting 2020-09-29 18:18:43 +02:00
vabene1111
697de3d9fc small mobile layout improvements 2020-09-29 14:19:17 +02:00
vabene1111
7bc09dfe89 finishes shopping lists 2020-09-29 14:15:18 +02:00
vabene1111
711dfbe55f cleanup import 2020-09-29 13:19:06 +02:00
vabene1111
76108c66c6 Merge pull request #189 from vabene1111/dependabot/pip/drf-writable-nested-0.6.1
Bump drf-writable-nested from 0.6.0 to 0.6.1
2020-09-29 12:56:31 +02:00
dependabot[bot]
db3c390d03 Bump drf-writable-nested from 0.6.0 to 0.6.1
Bumps [drf-writable-nested](https://github.com/beda-software/drf-writable-nested) from 0.6.0 to 0.6.1.
- [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.0...v0.6.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-29 10:56:26 +00:00
vabene1111
138fb14107 Merge pull request #188 from vabene1111/dependabot/pip/django-3.1.1
Bump django from 3.0.7 to 3.1.1
2020-09-29 12:56:19 +02:00
dependabot[bot]
17ebdd7711 Bump django from 3.0.7 to 3.1.1
Bumps [django](https://github.com/django/django) from 3.0.7 to 3.1.1.
- [Release notes](https://github.com/django/django/releases)
- [Commits](https://github.com/django/django/compare/3.0.7...3.1.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-29 10:56:07 +00:00
vabene1111
fc9a42029a Merge pull request #187 from vabene1111/dependabot/pip/beautifulsoup4-4.9.2
Bump beautifulsoup4 from 4.9.1 to 4.9.2
2020-09-29 12:55:35 +02:00
vabene1111
7d942d551a Merge pull request #186 from vabene1111/dependabot/pip/django-filter-2.4.0
Bump django-filter from 2.2.0 to 2.4.0
2020-09-29 12:55:25 +02:00
vabene1111
78c94f2b64 Merge pull request #185 from vabene1111/dependabot/pip/bleach-whitelist-0.0.11
Bump bleach-whitelist from 0.0.10 to 0.0.11
2020-09-29 12:55:15 +02:00
dependabot[bot]
b317d7ba29 Bump beautifulsoup4 from 4.9.1 to 4.9.2
Bumps [beautifulsoup4](http://www.crummy.com/software/BeautifulSoup/bs4/) from 4.9.1 to 4.9.2.

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-29 10:48:54 +00:00
dependabot[bot]
71b8ddd1bf Bump django-filter from 2.2.0 to 2.4.0
Bumps [django-filter](https://github.com/carltongibson/django-filter) from 2.2.0 to 2.4.0.
- [Release notes](https://github.com/carltongibson/django-filter/releases)
- [Changelog](https://github.com/carltongibson/django-filter/blob/master/CHANGES.rst)
- [Commits](https://github.com/carltongibson/django-filter/compare/2.2.0...2.4.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-29 10:48:52 +00:00
dependabot[bot]
23de4d4239 Bump bleach-whitelist from 0.0.10 to 0.0.11
Bumps [bleach-whitelist](https://github.com/yourcelf/bleach-whitelist) from 0.0.10 to 0.0.11.
- [Release notes](https://github.com/yourcelf/bleach-whitelist/releases)
- [Commits](https://github.com/yourcelf/bleach-whitelist/commits)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-29 10:48:50 +00:00
vabene1111
4641b81f70 Create dependabot.yml 2020-09-29 12:48:28 +02:00
vabene1111
a9bad5e5f9 create shopping from mealplan 2020-09-29 12:41:59 +02:00
vabene1111
9f7106a325 shopping list fixes 2020-09-29 11:41:10 +02:00
vabene1111
73f13f56e1 added ability to display message to users (via admin) 2020-09-22 12:36:27 +02:00
vabene1111
312c364797 fixed wrongly changed permission check order 2020-09-22 12:19:30 +02:00
vabene1111
ad9b10c9c1 allow entry deletion 2020-09-22 12:17:22 +02:00
vabene1111
678cfaca12 fixed several shopping list issues 2020-09-22 12:01:11 +02:00
vabene1111
9b36f51d16 added .env examples 2020-09-22 09:42:58 +02:00
vabene1111
fa8389d783 Merge pull request #172 from stewartadam/bugfix/configurable-urls
Permit MEDIA_URL and STATIC_URL to be set from environment variables
2020-09-22 09:29:48 +02:00
vabene1111
30d766be77 fixed clearing amount in recipe edit would result in error 2020-09-22 09:09:52 +02:00
vabene1111
5e2dba7b04 added basic exporting 2020-09-22 00:32:42 +02:00
vabene1111
70df7c5307 improved autosync data efficency 2020-09-22 00:20:44 +02:00
vabene1111
f91d9fcfe2 autosync shopping list and settings 2020-09-21 23:54:46 +02:00
vabene1111
086a4aea47 basics of shopping list working 2020-09-21 23:05:58 +02:00
vabene1111
148ce2faef shopping list item checking 2020-09-21 22:55:52 +02:00
vabene1111
4827364e37 basic acceptable design 2020-09-21 22:16:19 +02:00
vabene1111
da958faf33 basic shopping list ui cleanup 2020-09-21 22:05:53 +02:00
vabene1111
f5117abcfb fixed shopping list multipliers and recipe names 2020-09-21 11:56:39 +02:00
vabene1111
df79c8f889 basic shopping list load and save 2020-09-15 16:51:20 +02:00
vabene1111
0ff65d35dc partial shopping list saving 2020-09-07 13:09:03 +02:00
vabene1111
8239dc3604 fixed unit creation typo 2020-09-07 12:27:29 +02:00
vabene1111
4a4d4b4486 shopping display seperation 2020-09-03 11:38:22 +02:00
vabene1111
34733a427f model __str__ methods 2020-09-01 21:37:33 +02:00
vabene1111
7f68bbd25d added link based signup 2020-09-01 21:35:37 +02:00
vabene1111
392ee73719 basics of invite link creation 2020-09-01 14:57:20 +02:00
vabene1111
2a0a85018a fixed import and validation errors 2020-09-01 13:26:58 +02:00
vabene1111
62868cd2b2 added note support for recipe import 2020-09-01 11:49:19 +02:00
vabene1111
4e92be3bbc fixed scrolling issue in internal recipe edit
related to bootstrap vue issue, waiting on proper fix
2020-09-01 11:39:46 +02:00
vabene1111
14c94bf7ab WIP shopping list 2020-09-01 11:31:29 +02:00
Stewart Adam
ce3148ac89 Permit MEDIA_URL and STATIC_URL to be set from environment variables (#143) 2020-08-30 16:39:43 -07:00
tourn
652b4bf2af Add serving count to recipe 2020-08-30 16:00:01 +02:00
vabene1111
bc39b53aad fixed typo 2020-08-27 10:06:53 +02:00
vabene1111
984192e479 basics of scaling 2020-08-26 21:41:04 +02:00
vabene1111
3c73b084cf super basic shopping list working 2020-08-26 21:11:20 +02:00
vabene1111
fc073124d4 Merge pull request #162 from LBBO/amount-without-unit
Show amounts even when unit is empty
2020-08-26 20:33:18 +02:00
Michael Kuckuk
f6fb07926e Show amounts even when unit is empty 2020-08-26 12:39:21 +02:00
vabene1111
90dddd34f3 removed test for invalid recipe as its no longer invalid due to parser improvements 2020-08-26 11:46:56 +02:00
vabene1111
0b948618f3 improved website parser 2020-08-26 11:37:59 +02:00
vabene1111
78be002134 Merge pull request #154 from Mwoua/develop
Instructions for manual installation
2020-08-21 18:09:20 +02:00
Mwoua
7acd72ff3a Clone master instead of getting release 2020-08-21 09:12:57 -04:00
Mwoua
c5edeb7e8f Missing alias for media files 2020-08-19 18:09:23 -04:00
David Lévy
5d5c5a8597 Instructions for manual installation 2020-08-19 17:32:28 -04:00
David Lévy
03bdcdf9b4 Fix markdown rules 2020-08-18 16:32:00 -04:00
vabene1111
16d755fd76 Merge pull request #150 from vabene1111/translations_cookbook-locale-en-lc-messages-django-po--develop_fr
Translate '/cookbook/locale/en/LC_MESSAGES/django.po' in 'fr'
2020-08-12 11:24:17 +02:00
transifex-integration[bot]
587426e3d3 Apply translations in fr
translation completed for the source file '/cookbook/locale/en/LC_MESSAGES/django.po'
on the 'fr' language.
2020-08-11 15:26:15 +00:00
vabene1111
be55e034bf first parts of shopping rework 2020-08-11 15:24:12 +02:00
vabene1111
8055754455 shopping list basics 2020-08-11 12:17:12 +02:00
vabene1111
82497c734a uniform button style in recipe view 2020-08-09 20:55:02 +02:00
vabene1111
b39a55ee94 removed mistakingly added language 2020-08-09 20:49:16 +02:00
vabene1111
9d837cd633 added contributers 2020-08-09 20:44:21 +02:00
vabene1111
968206a7ab compiled translations 2020-08-09 20:40:55 +02:00
vabene1111
a769fe6906 Merge pull request #148 from vabene1111/translations_cookbook-locale-en-lc-messages-django-po--develop_fr_FR
Translate '/cookbook/locale/en/LC_MESSAGES/django.po' in 'fr_FR' [manual sync]
2020-08-09 20:35:05 +02:00
vabene1111
21cf4c5d70 Merge pull request #149 from vabene1111/translations_cookbook-locale-en-lc-messages-django-po--develop_de
Translate '/cookbook/locale/en/LC_MESSAGES/django.po' in 'de' [manual sync]
2020-08-09 20:34:53 +02:00
vabene1111
6c02912dad Merge pull request #147 from vabene1111/translations_cookbook-locale-en-lc-messages-django-po--develop_nl
Translate '/cookbook/locale/en/LC_MESSAGES/django.po' in 'nl' [manual sync]
2020-08-09 20:34:26 +02:00
transifex-integration[bot]
c0756d87a6 Apply translations in de
at least 95% translated for the source file '/cookbook/locale/en/LC_MESSAGES/django.po'
on the 'de' language.

 Manual sync of partially translated files: untranslated content is included with an empty translation or source language content depending on file format
2020-08-09 18:33:53 +00:00
transifex-integration[bot]
2471c7982d Apply translations in fr_FR
at least 95% translated for the source file '/cookbook/locale/en/LC_MESSAGES/django.po'
on the 'fr_FR' language.

 Manual sync of partially translated files: untranslated content is included with an empty translation or source language content depending on file format
2020-08-09 18:33:48 +00:00
transifex-integration[bot]
b36e440920 Apply translations in nl
at least 95% translated for the source file '/cookbook/locale/en/LC_MESSAGES/django.po'
on the 'nl' language.

 Manual sync of partially translated files: untranslated content is included with an empty translation or source language content depending on file format
2020-08-09 18:33:43 +00:00
vabene1111
a8b1ee9765 changed url import api call to post url 2020-08-09 20:13:05 +02:00
vabene1111
782d276724 cleanup ids in import as well 2020-07-20 21:12:18 +02:00
vabene1111
9510562576 backup basic fixture 2020-07-15 22:05:48 +02:00
vabene1111
363a4b6ff7 fixed sys page broken html tags in german locale 2020-07-15 21:52:31 +02:00
vabene1111
f52dd9ba51 recompiled messages 2020-07-15 19:33:09 +02:00
vabene1111
4ffc4dc248 updates german translation 2020-07-15 19:26:41 +02:00
vabene1111
696791d059 url import improvements 2020-07-15 18:28:43 +02:00
vabene1111
c9f1576b24 several recipe view improvements 2020-07-15 18:05:12 +02:00
vabene1111
1cea0350c9 added todo info 2020-07-14 00:23:35 +02:00
vabene1111
e0dac67b84 fixed recipe api permissions when using shared recipes 2020-07-14 00:22:39 +02:00
vabene1111
c45472689e small fixes 2020-07-13 23:07:35 +02:00
vabene1111
5b7ec37637 hotkeys, styling, step improvements 2020-07-13 22:55:09 +02:00
vabene1111
4d08477b23 fixed decimals 2020-07-13 21:38:42 +02:00
vabene1111
9b9fbd5cab added food api view tests 2020-07-09 22:19:24 +02:00
vabene1111
8c118dbd3e use appropriate serializer for unit 2020-07-09 22:16:52 +02:00
vabene1111
bfe9e794c5 added tests for unit api view 2020-07-09 22:13:33 +02:00
vabene1111
3e16361322 added keyword api tests 2020-07-09 22:00:14 +02:00
vabene1111
35e8dc4ce9 removed keyword created by as it was never populated 2020-07-09 21:55:05 +02:00
vabene1111
8e8c7fe563 fixed sync test 2020-07-09 00:43:09 +02:00
vabene1111
69d5e628c5 sync admin view + tests 2020-07-08 23:40:53 +02:00
vabene1111
e65c8436ef sync api view + tests 2020-07-08 23:28:28 +02:00
vabene1111
e83565b1f2 added api endpoints and tests 2020-07-08 23:19:39 +02:00
vabene1111
692811f84f fixed settings dropdown being below recipe edit buttons 2020-07-08 22:26:06 +02:00
vabene1111
0aa37d176f api function queryset cleanup 2020-07-08 22:24:52 +02:00
vabene1111
92341380bc actually fixed error 2020-07-08 22:14:22 +02:00
vabene1111
19df215bd2 external recipe view vue error fix 2020-07-08 22:03:41 +02:00
vabene1111
372dd0afa1 recipe step sidebar no name 2020-07-08 21:55:17 +02:00
vabene1111
b89c38a696 error messages 2020-07-08 21:53:55 +02:00
vabene1111
f177fed8e2 Merge branch 'feature/recipe-steps' into develop 2020-07-08 21:23:58 +02:00
vabene1111
1d2976b687 create default step + view time improvement 2020-07-08 21:23:41 +02:00
vabene1111
b490673866 javascript toasts 2020-07-08 21:01:01 +02:00
vabene1111
5f2320a3e7 added save confirm 2020-07-05 22:36:39 +02:00
vabene1111
5b916e955c WIP page leave confirm 2020-07-05 22:15:00 +02:00
vabene1111
5bad507845 fixed and improved URL import 2020-07-05 21:11:25 +02:00
vabene1111
64603fca51 added time to text steps 2020-07-02 13:23:16 +02:00
vabene1111
6018101012 fixed step time calculation 2020-07-02 13:19:27 +02:00
vabene1111
ddaa9e6356 added step time calculation 2020-07-02 13:16:15 +02:00
vabene1111
98f9555ef6 check box linking 2020-07-02 12:15:30 +02:00
vabene1111
1619d4894c step header rendering 2020-07-02 12:12:17 +02:00
vabene1111
1e2d7f77af basic vue in recipe view 2020-07-02 11:20:11 +02:00
vabene1111
80423da16d removed duplicate div 2020-07-01 23:44:58 +02:00
vabene1111
67a4a2627b fixed meal plan form not own type display 2020-07-01 23:29:32 +02:00
vabene1111
0005ca243c testing around 2020-07-01 23:22:29 +02:00
vabene1111
adbc7e4a39 icons and stuff 2020-07-01 22:27:32 +02:00
vabene1111
9caec2dff2 step sidebar sorting 2020-07-01 21:53:41 +02:00
vabene1111
41eef9a913 step sorting buttons 2020-07-01 21:42:46 +02:00
vabene1111
31357c552c ui improvements 2020-07-01 21:04:28 +02:00
vabene1111
5d70dca039 time step + step delete + sorting improvement 2020-07-01 20:38:35 +02:00
vabene1111
2c5fbc558e fixed recipe image preview scaling in large search 2020-07-01 18:56:00 +02:00
vabene1111
98bdad5955 second fix 2020-06-29 22:58:31 +02:00
vabene1111
6eb41fe33f fixed keywords and food/unit loading 2020-06-29 22:41:54 +02:00
vabene1111
e94bd32a70 license update 2020-06-29 22:22:35 +02:00
vabene1111
29e2f9ee15 fixed filter for foods 2020-06-29 22:20:55 +02:00
vabene1111
357771e81b updated translation files 2020-06-29 22:20:42 +02:00
vabene1111
941264731e fixed ingredient adding attributes 2020-06-29 22:03:43 +02:00
vabene1111
2c59302fe9 conditional header/no amount render 2020-06-29 22:01:42 +02:00
vabene1111
a96bf9a4d7 license update 2020-06-29 21:07:55 +02:00
vabene1111
e2508cbc6f step ordering 2020-06-29 20:45:30 +02:00
vabene1111
577af85d38 fixed import export 2020-06-29 19:09:15 +02:00
vabene1111
38e5882376 added recipe large search context menu 2020-06-29 18:17:13 +02:00
vabene1111
08f06fe1d8 fixed non fa-fw recipe view edit icon 2020-06-29 18:16:10 +02:00
vabene1111
4ddc39f1c2 basic shopping list fix 2020-06-29 18:11:25 +02:00
vabene1111
78275145f8 one more non atomic transaction 2020-06-29 18:07:56 +02:00
vabene1111
f7b518d890 run rename migration as non atomic to support old sqlite versions 2020-06-29 18:04:56 +02:00
vabene1111
8cff44df7d recipe steps tagging support 2020-06-29 17:56:50 +02:00
vabene1111
cdee31e9af tests working again 2020-06-29 16:43:53 +02:00
vabene1111
06db7114ed basic view step design 2020-06-29 16:24:41 +02:00
vabene1111
8f28e4766d side nav in recipe edit 2020-06-29 16:12:24 +02:00
vabene1111
dbdb35e2f3 reworked base container to allow side cols 2020-06-29 15:59:19 +02:00
vabene1111
27963fcaa6 image upload working 2020-06-29 15:39:58 +02:00
vabene1111
d613da7faf mobile and large layout 2020-06-29 14:10:21 +02:00
vabene1111
d481767154 wip flex ui 2020-06-29 13:29:59 +02:00
vabene1111
8b9c7daaae fixed commas + desktop flex design 2020-06-29 12:27:54 +02:00
vabene1111
3a2ba773cf layout before flex test 2020-06-29 11:30:24 +02:00
vabene1111
642224fec9 sorting and ingredient adding 2020-06-26 15:00:41 +02:00
vabene1111
3d4aebcd9d ordering of ingredients and steps 2020-06-26 14:50:33 +02:00
vabene1111
c178aea363 nested serializers and basic recipe editing working 2020-06-26 13:41:41 +02:00
vabene1111
5e20833b7e testing with serializers 2020-06-26 13:10:23 +02:00
vabene1111
db7f0d4988 fixed recipe edit button text 2020-06-26 08:53:46 +02:00
vabene1111
381bc5ffb4 partially working steps edit view 2020-06-25 23:48:27 +02:00
vabene1111
4a6b32d9af super basic edit view 2020-06-25 23:24:09 +02:00
vabene1111
8b814669af fixed API permission denied error
forgot a return in the custom permissions wich prevent authorized useres to access certain endpoints
2020-06-25 23:23:12 +02:00
vabene1111
ae0928f85f added recipe steps 2020-06-25 22:38:17 +02:00
vabene1111
bf516d37a9 Merge branch 'develop' into feature/recipe-steps 2020-06-25 22:09:00 +02:00
vabene1111
6979bf34d9 fixed insecure uuid defaults
due to some unexpected behavior the share link uuid values were not random. All already created share links were disabled.
2020-06-25 22:01:54 +02:00
vabene1111
bda38f0647 changed recipe ingredient relation 2020-06-25 21:45:16 +02:00
vabene1111
df912b8865 renamed recipeingredient to ingredient 2020-06-25 21:37:18 +02:00
vabene1111
f685253645 renamed ingredient to food 2020-06-25 21:24:03 +02:00
vabene1111
2c5e44d73c improved recipe parser, added tests, cleaned up resources 2020-06-24 21:22:23 +02:00
vabene1111
b6d98397b5 improved recipe import 2020-06-24 20:21:48 +02:00
vabene1111
525ad6dd98 removed debug code and cdn dependencies 2020-06-23 20:36:04 +02:00
vabene1111
166833fe83 moved recipe edit button to dropdown menu 2020-06-23 19:01:35 +02:00
vabene1111
752854028a more recipe import fixes 2020-06-23 18:48:22 +02:00
vabene1111
6197cab1ed improved url import [WIP] 2020-06-23 18:13:16 +02:00
vabene1111
73f2240763 fixed import error 2020-06-23 14:00:07 +02:00
vabene1111
3ef82aee9c updated readme 2020-06-23 12:57:05 +02:00
vabene1111
e49e53e2b2 async loading of multiselect fields 2020-06-23 12:54:27 +02:00
vabene1111
0266476aef import page style update 2020-06-23 12:46:13 +02:00
vabene1111
5ed369ba69 recipe import unit/ingredeitn selection 2020-06-23 12:34:00 +02:00
vabene1111
98c278fe60 importing improvements 2020-06-23 11:04:49 +02:00
vabene1111
8594346488 basic importing working 2020-06-23 10:34:04 +02:00
vabene1111
dc91e1e8ed fixed url router and added recipe import test ressources 2020-06-22 23:35:18 +02:00
vabene1111
976dd13a31 basic importing working 2020-06-22 23:23:06 +02:00
vabene1111
8cca272bb9 import UI cleanup 2020-06-22 22:56:56 +02:00
vabene1111
f066b7097c microdata import 2020-06-22 22:47:33 +02:00
vabene1111
71b41a9ca2 refactor json ld code into helper 2020-06-22 21:35:56 +02:00
vabene1111
9e748552b2 recipe url import ld json 2020-06-22 21:16:31 +02:00
vabene1111
743d7bf608 cleanup vue debug settings 2020-06-22 12:23:49 +02:00
vabene1111
315b4521b6 test page 2020-06-22 12:14:24 +02:00
vabene1111
b558ba55b4 fixed mis-aligned menu in recipe view 2020-06-22 11:12:26 +02:00
vabene1111
0368630c92 added more view tests 2020-06-17 15:25:16 +02:00
vabene1111
02c1ba0c71 structured and extended test 2020-06-17 15:06:29 +02:00
vabene1111
83cc8832cb improved duplicate testing code 2020-06-17 14:53:00 +02:00
vabene1111
14a5d43dc8 added complete test for user preference api 2020-06-17 14:33:55 +02:00
vabene1111
bea079dd05 further permission cleanup 2020-06-17 13:23:04 +02:00
vabene1111
df8170fa55 improved permission handlin 2020-06-17 13:18:28 +02:00
vabene1111
2904d5938d fixed sync create permission 2020-06-17 13:00:13 +02:00
vabene1111
18bfecb026 fixed DRF object permission 2020-06-17 12:12:42 +02:00
vabene1111
4ee5a4fd9f testing with user permission 2020-06-17 11:06:08 +02:00
vabene1111
bbaedfad33 documentation update api 2020-06-17 10:29:01 +02:00
vabene1111
de413f1473 custom browsable api header 2020-06-17 10:12:27 +02:00
vabene1111
d012385088 WIP api stuff 2020-06-16 20:32:41 +02:00
vabene1111
d18a330135 reset log level 2020-06-16 19:56:42 +02:00
vabene1111
a8f7ef8ef7 added missing dependency 2020-06-16 19:55:48 +02:00
vabene1111
d6972cacfb pyyaml dependency 2020-06-16 19:43:44 +02:00
vabene1111
3b21e44422 log level debug 2020-06-16 18:57:08 +02:00
vabene1111
1a78ca68bb added access logging 2020-06-16 18:50:24 +02:00
vabene1111
fac7b8cd5b added gunicorn error logging 2020-06-16 18:43:16 +02:00
vabene1111
8f780545a4 api browser link 2020-06-16 18:14:41 +02:00
vabene1111
218f7d92d7 fixed password settings autofocus 2020-06-16 18:04:42 +02:00
vabene1111
621bacff1c api token settings 2020-06-16 18:01:16 +02:00
vabene1111
9a849a979c ui secret key check 2020-06-16 17:42:53 +02:00
vabene1111
e8366e5280 added secret key system check 2020-06-16 17:42:43 +02:00
vabene1111
0a8270e7cf api documentation basics 2020-06-16 17:21:50 +02:00
vabene1111
aad8b220d1 added custom 404 page 2020-06-16 16:21:15 +02:00
vabene1111
d5e0a0a623 added comment setting to user pref admin table 2020-06-16 12:45:46 +02:00
vabene1111
8cd94d49e8 added comment system preference 2020-06-16 12:44:45 +02:00
vabene1111
08b805a547 fixed meal plan delete after create 2020-06-16 12:12:37 +02:00
vabene1111
ecac30136b no sharing external recipes + hide buttons for unauth 2020-06-16 12:07:18 +02:00
vabene1111
d694408af6 share link admin 2020-06-16 12:05:36 +02:00
vabene1111
6e284f6ae8 moved all recipe button 2020-06-16 12:03:42 +02:00
vabene1111
62c049a6de fixed unauthenticated recipe viewing 2020-06-16 11:49:02 +02:00
vabene1111
dee7249347 added sharing links and appropriate tests 2020-06-16 11:23:58 +02:00
vabene1111
17946c8dac markdown hint text 2020-06-16 10:37:11 +02:00
vabene1111
fa2326949e added back markdown support to meal plannin notes 2020-06-16 10:34:20 +02:00
vabene1111
8177d9ba0f added synology install instruction 2020-06-16 10:19:24 +02:00
vabene1111
8781a6572d set some norefer labels
probably not really needed for this case but satisfies the code scanning and does not hurt to have
2020-06-16 10:13:54 +02:00
vabene1111
c7d518071c Create codeql-analysis.yml 2020-06-16 09:56:57 +02:00
vabene1111
ea96c63289 stupid apple fix 2020-06-13 14:03:50 +02:00
vabene1111
8485a64726 viewlog/cooklog admin 2020-06-12 00:07:47 +02:00
vabene1111
e89bd44412 added to string to meal plan 2020-06-11 23:43:48 +02:00
vabene1111
2e0e48bb38 removed celery 2 2020-06-11 23:29:24 +02:00
vabene1111
040fa7c192 removed celery 2020-06-11 23:29:10 +02:00
vabene1111
7000097602 fixed share reset in meal plan move 2020-06-11 22:53:04 +02:00
vabene1111
3cbc6b5609 meal type admin 2020-06-11 22:48:26 +02:00
vabene1111
8ff52f542e ingredient rounding upgrades 2020-06-11 22:32:45 +02:00
vabene1111
8cc0fcaed2 fixed properly deep copy meal_type array 2020-06-11 20:22:04 +02:00
vabene1111
d4197773bf clean up logging 2020-06-11 19:04:15 +02:00
vabene1111
f530b3dc7a dependency cleanup 2020-06-11 19:00:17 +02:00
vabene1111
d1bf4d4bbb added ical export support 2020-06-11 18:38:56 +02:00
vabene1111
d584a3db25 added more help 2020-06-11 17:57:30 +02:00
vabene1111
aaa3737ae0 help and name based type indexing 2020-06-11 17:55:24 +02:00
vabene1111
5072859e57 re enabled basic sharing 2020-06-11 17:27:27 +02:00
vabene1111
ead3c6ef76 fixed sharing 2020-06-11 17:13:31 +02:00
vabene1111
d734cb813e plan type editing 2020-06-11 16:58:57 +02:00
vabene1111
8aa24d4771 per user meal types 2020-06-11 15:19:15 +02:00
vabene1111
c714ff4dbe name function cleanup 2020-06-11 11:42:38 +02:00
vabene1111
a32545c1dc proper mobile handle 2020-06-11 11:40:32 +02:00
vabene1111
dfe8e1fd42 layout improvements 2020-06-11 10:59:26 +02:00
vabene1111
729d573460 imrpoved detail view 2020-06-11 10:26:40 +02:00
vabene1111
8472b541aa correctly update plan 2020-06-11 01:14:09 +02:00
vabene1111
7e95e985ec proper async loading 2020-06-11 01:05:02 +02:00
vabene1111
f7e2aa9b83 week switching 2020-06-11 00:49:19 +02:00
vabene1111
99cf428470 plan entry detail modal 2020-06-10 23:33:18 +02:00
vabene1111
60a533f9c8 Merge branch 'develop' into feature/meal-planning 2020-06-10 16:01:21 +02:00
vabene1111
723416575f added alt text 2020-06-10 15:52:18 +02:00
vabene1111
e34889953a cleanup and allow loading of images 2020-06-10 15:51:47 +02:00
vabene1111
ec8a879efa improved pdf viewer 2020-06-10 15:40:24 +02:00
vabene1111
f44ebe0d05 Update issue templates 2020-06-10 12:09:37 +02:00
vabene1111
13c82cdbf9 made remote auth a config setting 2020-06-10 12:02:27 +02:00
vabene1111
e9a60ece81 Merge pull request #88 from cazier/develop
Adding Reverse Proxy Authentication
2020-06-10 11:56:16 +02:00
vabene1111
9575a86480 fixed ingredient deletion error 2020-06-10 11:52:24 +02:00
vabene1111
12036b9972 fixes protect error on storage monitor delete #102 2020-06-10 11:45:52 +02:00
vabene1111
bffb260dfa fixed delete source permission 2020-06-10 11:42:44 +02:00
vabene1111
9d460a3623 Update docker-publish-release.yml 2020-06-10 11:38:45 +02:00
vabene1111
56c5f28348 Update docker-publish-latest.yml 2020-06-10 11:37:49 +02:00
vabene1111
29d4dcb73d fixed yaml formatting 2020-06-10 11:36:45 +02:00
vabene1111
e60441ec99 add version script to tagged releases 2020-06-10 11:34:05 +02:00
vabene1111
608e024caa formatting + further testing 2020-06-10 11:19:28 +02:00
vabene1111
f596b12f12 testing build ref version writing 2020-06-10 11:08:59 +02:00
vabene1111
bdd41a5ba2 removed redundant quotes 2020-06-10 10:47:47 +02:00
vabene1111
80e566917e version writer script fixes 2020-06-10 10:33:19 +02:00
vabene1111
4294c132c6 version script path fix 2020-06-10 10:24:54 +02:00
vabene1111
da12daaf03 add version to action 2020-06-10 10:15:28 +02:00
vabene1111
150cf5ebac testing auto version 2020-06-10 10:13:11 +02:00
vabene1111
01b9022451 version script test 2020-06-10 10:07:33 +02:00
vabene1111
2bda5bbbf7 note text saving 2020-06-09 20:27:31 +02:00
vabene1111
a743a4e202 basics completly working 2020-06-09 20:15:06 +02:00
vabene1111
ffa7513f9e recipes and notes basically working 2020-06-09 17:26:50 +02:00
vabene1111
8cb6ed2f60 adding items to plan 2020-06-09 13:11:01 +02:00
vabene1111
1d6375bf84 fixed pdf js files missing 2020-06-09 12:28:48 +02:00
vabene1111
cfab867e0d removed no longer valid warning 2020-06-09 00:18:28 +02:00
vabene1111
29dd7c9ee7 add port mapping to plain example 2020-06-09 00:17:17 +02:00
vabene1111
72cb046e37 updated plain example 2020-06-09 00:16:04 +02:00
vabene1111
a555906a32 fixed user setup staff permission 2020-06-06 11:31:19 +02:00
vabene1111
2e255aba0d more plan basics working 2020-06-04 19:46:35 +02:00
vabene1111
a136a18a8e basic updating and loading working 2020-06-04 19:34:47 +02:00
Brendan Cazier
cdf4c0d1bb Re-adding import statement 2020-06-04 07:51:43 -05:00
vabene1111
3aedbfbdc3 Merge branch 'develop' into feature/meal-planning
# Conflicts:
#	requirements.txt
2020-06-04 13:12:52 +02:00
vabene1111
dc7c688ed5 show english first in language chooser 2020-06-04 09:58:18 +02:00
vabene1111
8aa8f15ad7 fixed path + added language option dutch (nl) 2020-06-04 09:57:28 +02:00
vabene1111
6b8a231eee Merge pull request #95 from D0T1X/develop
added base translation file for Dutch
2020-06-04 09:33:17 +02:00
D0T1X
b0e338f08a added base translation files 2020-06-04 07:25:31 +02:00
D0T1X
1a6e0c8706 Uploaded Django.po 2020-06-04 07:24:45 +02:00
D0T1X
c7ceae4350 Create temp 2020-06-04 07:24:24 +02:00
D0T1X
caefa6099b Delete temp 2020-06-04 07:21:33 +02:00
D0T1X
2e4645bb0c Creatend nl/MC_MESSAGES folde 2020-06-04 07:20:23 +02:00
vabene1111
6c966f8ef6 added versions to requirements.txt 2020-06-03 23:43:25 +02:00
vabene1111
7140cb0f93 basic system information page 2020-06-03 23:07:19 +02:00
vabene1111
b95c3f6685 working lists 2020-06-03 18:10:34 +02:00
Brendan Cazier
81cd551975 Added some basic documentation 2020-06-03 10:40:12 -05:00
Brendan Cazier
55777fd948 Added REMOTE_USER auth 2020-06-03 10:16:17 -05:00
vabene1111
3b5b505116 basic plan table drag and drop working 2020-06-03 12:05:43 +02:00
vabene1111
aea3f62f9b event parameter 2020-06-03 11:18:37 +02:00
vabene1111
201c493658 some working drag and drop stuff 2020-06-03 00:03:54 +02:00
vabene1111
8ffc6a0236 some basic drag and drop workin 2020-06-02 22:52:28 +02:00
vabene1111
84ad88b30b Merge branch 'develop' into feature/meal-planning 2020-06-02 22:32:30 +02:00
vabene1111
233f2a911f nothing working yet 2020-06-02 14:33:27 +02:00
vabene1111
989d8765d7 basic vue stuff working 2020-06-02 12:47:36 +02:00
vabene1111
2fcd207dc7 basic api 2020-06-02 12:04:14 +02:00
vabene1111
a3dc5f283a dynamic meal types 2020-06-02 11:46:16 +02:00
702 changed files with 253971 additions and 11081 deletions

View File

@@ -14,5 +14,4 @@ LICENSE
.idea
LICENSE.md
docs
nginx
update.sh

View File

@@ -1,21 +1,98 @@
# only set this to true when testing/debugging
# when unset: 1 (true) - dont unset this, just for development
DEBUG=0
# hosts the application can run under e.g. recipes.mydomain.com,cooking.mydomain.com,...
ALLOWED_HOSTS=*
# random secret key, use for example base64 /dev/urandom | head -c50 to generate one
# random secret key, use for example `base64 /dev/urandom | head -c50` to generate one
SECRET_KEY=
# your default timezone See https://timezonedb.com/time-zones for a list of timezones
TIMEZONE=Europe/Berlin
# add only a database password if you want to run with the default postgres, otherwise change settings accordingly
DB_ENGINE=django.db.backends.postgresql_psycopg2
DB_ENGINE=django.db.backends.postgresql
# DB_OPTIONS= {} # e.g. {"sslmode":"require"} to enable ssl
POSTGRES_HOST=db_recipes
POSTGRES_PORT=5432
POSTGRES_USER=djangodb
POSTGRES_USER=djangouser
POSTGRES_PASSWORD=
POSTGRES_DB=djangodb
# database connection string, when used overrides other database settings.
# format might vary depending on backend
# DATABASE_URL = engine://username:password@host:port/dbname
# the default value for the user preference 'fractions' (enable/disable fraction support)
# default: disabled=0
FRACTION_PREF_DEFAULT=0
# the default value for the user preference 'comments' (enable/disable commenting system)
# default comments enabled=1
COMMENT_PREF_DEFAULT=1
# Users can set a amount of time after which the shopping list is refreshed when they are in viewing mode
# This is the minimum interval users can set. Setting this to low will allow users to refresh very frequently which
# might cause high load on the server. (Technically they can obviously refresh as often as they want with their own scripts)
SHOPPING_MIN_AUTOSYNC_INTERVAL=5
# Default for user setting sticky navbar
# STICKY_NAV_PREF_DEFAULT=1
# If staticfiles are stored at a different location uncomment and change accordingly
# STATIC_URL=/static/
# If mediafiles are stored at a different location uncomment and change accordingly
# MEDIA_URL=/media/
# Serve mediafiles directly using gunicorn. Basically everyone recommends not doing this. Please use any of the examples
# provided that include an additional nxginx container to handle media file serving.
# If you know what you are doing turn this back on (1) to serve media files using djangos serve() method.
# when unset: 1 (true) - this is temporary until an appropriate amount of time has passed for everyone to migrate
GUNICORN_MEDIA=0
# 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=
# S3_SECRET_ACCESS_KEY=
# S3_BUCKET_NAME=
# S3_QUERYSTRING_AUTH=1 # default true, set to 0 to serve media from a public bucket without signed urls
# S3_ENDPOINT_URL= # when using a custom endpoint like minio
# 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)
# EMAIL_HOST=
# EMAIL_PORT=
# EMAIL_HOST_USER=
# 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] ")
# 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/
# when unset: 0 (false)
REVERSE_PROXY_AUTH=0
# Default settings for spaces, apply per space and can be changed in the admin view
# SPACE_DEFAULT_MAX_RECIPES=0 # 0=unlimited recipes
# SPACE_DEFAULT_MAX_USERS=0 # 0=unlimited users per space
# SPACE_DEFAULT_FILES=1 # 1=can upload files (images, etc.) NOT IMPLEMENTED YET
# allow people to create accounts on your application instance (without an invite link)
# when unset: 0 (false)
# ENABLE_SIGNUP=0
# allows you to setup OAuth providers
# see docs for more information https://vabene1111.github.io/recipes/features/authentication/
# SOCIAL_PROVIDERS = allauth.socialaccount.providers.github, allauth.socialaccount.providers.nextcloud,
# Should a newly created user from a social provider get assigned to the default space and given permission by default ?
# ATTENTION: This feature might be deprecated in favor of a space join and public viewing system in the future
# default 0 (false), when 1 (true) users will be assigned space and group
# SOCIAL_DEFAULT_ACCESS = 1
# if SOCIAL_DEFAULT_ACCESS is used, which group should be added
# SOCIAL_DEFAULT_GROUP=guest

15
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@@ -0,0 +1,15 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''
---
### Version
Please provide your current version (can be found on the system page since v0.8.4)
Version:
### Bug description
A clear and concise description of what the bug is.

View File

@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.

33
.github/ISSUE_TEMPLATE/help-request.md vendored Normal file
View File

@@ -0,0 +1,33 @@
---
name: Help request
about: If there is anything wrong with your setup
title: ''
labels: setup issue
assignees: ''
---
## Issue
Please describe your problem here
## Setup Info
Version: (can be found on the system page since v0.8.4)
OS: e.g. Ubuntu 20.02
Other relevant information regarding your problem (proxies, firewalls, etc.)
### `.env`
Please include your `.env` config file (**make sure to remove/replace all secrets**)
```
env content
```
### `docker-compose.yml`
When running with docker compose please provide your `docker-compose.yml`
```
docker-compose.yml content
```
### Logs
If you feel like there is anything interesting please post the output of `docker-compose logs` at
container startup and when the issue happens.

22
.github/ISSUE_TEMPLATE/url_import.md vendored Normal file
View File

@@ -0,0 +1,22 @@
---
name: Website Import
about: Anything related to website imports
title: ''
labels: enhancement, url_import
assignees: ''
---
### Version
Please provide your current version (can be found on the system page since v0.8.4)
Version:
### Information
Exact URL you are trying to import from:
When did the issue happen: When pressing the search button with the url / when importing after the page has loaded
Response/Message shown
```
Message
```

11
.github/dependabot.yml vendored Normal file
View File

@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
- package-ecosystem: "pip" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "daily"

View File

@@ -9,19 +9,20 @@ jobs:
strategy:
max-parallel: 4
matrix:
python-version: [3.8]
python-version: [3.9]
steps:
- uses: actions/checkout@v1
- name: Set up Python 3.8
- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
python-version: 3.8
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
python3 manage.py collectstatic --noinput
python3 manage.py collectstatic_js_reverse
- name: Django Testing project
run: |
python3 manage.py test
pytest

53
.github/workflows/codeql-analysis.yml vendored Normal file
View File

@@ -0,0 +1,53 @@
name: "Code scanning - action"
on:
push:
pull_request:
schedule:
- cron: '0 13 * * 2'
jobs:
CodeQL-Build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2
# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
# Override language selection by uncommenting this and choosing your languages
with:
languages: python, javascript
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
# - name: Autobuild
# uses: github/codeql-action/autobuild@v1
# Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
#- run: |
# make bootstrap
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
with:
languages: javascript, python

View File

@@ -0,0 +1,26 @@
name: publish beta image docker
on:
push:
branches:
- 'beta'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- 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
- name: Build and publish image
uses: ilteoood/docker_buildx@master
with:
publish: true
imageName: vabene1111/recipes
tag: beta
dockerHubUser: ${{ secrets.DOCKER_USERNAME }}
dockerHubPassword: ${{ secrets.DOCKER_PASSWORD }}

View File

@@ -10,6 +10,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Update version file
uses: DamianReeves/write-file-action@v1.0
with:
path: recipes/version.py
contents: |
VERSION_NUMBER = 'develop'
BUILD_REF = '${{ github.sha }}'
write-mode: overwrite
- name: Publish to Registry
uses: elgohr/Publish-Docker-Github-Action@2.13
with:

View File

@@ -1,14 +1,25 @@
name: publish latest image docker
on:
push:
branches:
- master
tags:
- '*'
jobs:
build:
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\//}
- 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
- name: Build and publish image
uses: ilteoood/docker_buildx@master
with:

View File

@@ -7,19 +7,27 @@ on:
jobs:
build:
runs-on: ubuntu-latest
name: Build image job
steps:
- name: Checkout master
uses: actions/checkout@master#
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- name: Build and publish image
uses: ilteoood/docker_buildx@master
with:
publish: true
imageName: vabene1111/recipes
tag: ${{ steps.get_version.outputs.VERSION }}
dockerHubUser: ${{ secrets.DOCKER_USERNAME }}
dockerHubPassword: ${{ secrets.DOCKER_PASSWORD }}
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\//}
- 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
- name: Build and publish image
uses: ilteoood/docker_buildx@master
with:
publish: true
imageName: vabene1111/recipes
tag: ${{ steps.get_version.outputs.VERSION }}
dockerHubUser: ${{ secrets.DOCKER_USERNAME }}
dockerHubPassword: ${{ secrets.DOCKER_PASSWORD }}

17
.github/workflows/docs.yml vendored Normal file
View File

@@ -0,0 +1,17 @@
name: Make Docs
on:
push:
branches:
- master
- develop
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.x
- run: pip install mkdocs-material
- run: mkdocs gh-deploy --force

2
.gitignore vendored
View File

@@ -77,3 +77,5 @@ postgresql/
/docker-compose.override.yml
vue/node_modules
.vscode/

5
.idea/codeStyles/codeStyleConfig.xml generated Normal file
View File

@@ -0,0 +1,5 @@
<component name="ProjectCodeStyleConfiguration">
<state>
<option name="PREFERRED_PROJECT_CODE_STYLE" value="Default" />
</state>
</component>

View File

@@ -1,7 +1,14 @@
<component name="ProjectDictionaryState">
<dictionary name="vabene1111-PC">
<words>
<w>autosync</w>
<w>chowdown</w>
<w>csrftoken</w>
<w>gunicorn</w>
<w>ical</w>
<w>mealie</w>
<w>pepperplate</w>
<w>safron</w>
<w>traefik</w>
</words>
</dictionary>

12
.idea/recipes.iml generated
View File

@@ -14,22 +14,22 @@
</component>
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/cookbook/tests/resources" />
<excludeFolder url="file://$MODULE_DIR$/staticfiles" />
<excludeFolder url="file://$MODULE_DIR$/venv" />
</content>
<orderEntry type="jdk" jdkName="Python 3.8 (recipes)" jdkType="Python SDK" />
<orderEntry type="jdk" jdkName="Python 3.9 (recipes)" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="jquery-3.4.1" level="application" />
<orderEntry type="library" name="pretty-checkbox" level="application" />
<orderEntry type="library" name="pdf" level="application" />
<orderEntry type="library" name="pdf_viewer" level="application" />
</component>
<component name="TemplatesService">
<option name="TEMPLATE_CONFIGURATION" value="Django" />
<option name="TEMPLATE_FOLDERS">
<list>
<option value="$MODULE_DIR$/templates" />
<option value="$MODULE_DIR$/cookbook/templates" />
</list>
</option>
</component>
<component name="TestRunnerService">
<option name="PROJECT_TEST_RUNNER" value="pytest" />
</component>
</module>

31
.pre-commit-config.yaml Normal file
View File

@@ -0,0 +1,31 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: local
hooks:
- id: pre-commit-yarn-build
name: Build javascript files
entry: yarn --cwd ./vue build
always_run: true
language: system
types: [ python ]
pass_filenames: false
#- id: pre-commit-django-migrations
# name: Check django migrations
# entry: bash -c './venv/bin/activate && ./manage.py makemigrations --check'
# language: system
# types: [ python ]
# pass_filenames: false
# - id: pre-commit-django-make-messages
# name: Make messages if necessary
# entry: ./manage.py makemessages -i venv -a
# language: system
# types: [ python ]
# pass_filenames: false
# - id: pre-commit-django-compile-messages
# name: Compile messages if necessary
# entry: ./manage.py compilemessages -i venv
# language: system
# types: [ python ]
# pass_filenames: false

63
CONTRIBUTERS.md Normal file
View File

@@ -0,0 +1,63 @@
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.
- @tourn provided the serving feature and **several** other improvements!
- @l0c4lh057 provided a much improved ingredient text parser in [#277](https://github.com/vabene1111/recipes/pull/277)
- @sebimarkgraf added nutritional information [#199](https://github.com/vabene1111/recipes/pull/199)
- @cazier added reverse proxy authentication [#88](https://github.com/vabene1111/recipes/pull/88)
## Translations
### 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/)
### 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/)
### German
[eTaurus](https://www.transifex.com/user/profile/eTaurus/)
[l0c4lh057](https://www.transifex.com/user/profile/l0c4lh057/)
### 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/)
### 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/)
### 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/)
### Turkish
[batmanisnaked](https://www.transifex.com/user/profile/batmanisnaked/)
### Vietnamese
[vuongtrunghieu](https://www.transifex.com/user/profile/vuongtrunghieu/)

View File

@@ -1,18 +1,28 @@
FROM python:3.8-alpine
FROM python:3.9-alpine3.12
RUN apk add --no-cache postgresql-libs gettext zlib libjpeg libxml2-dev libxslt-dev
#Install all dependencies.
RUN apk add --no-cache postgresql-libs gettext zlib libjpeg libxml2-dev libxslt-dev py-cryptography
#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 . ./
RUN chmod +x boot.sh setup.sh
RUN ln -s /opt/recipes/setup.sh /usr/local/bin/createsuperuser
RUN apk add --no-cache --virtual .build-deps gcc musl-dev postgresql-dev zlib-dev jpeg-dev && \
COPY requirements.txt ./
RUN apk add --no-cache --virtual .build-deps gcc musl-dev postgresql-dev zlib-dev jpeg-dev libressl-dev libffi-dev cargo && \
python -m venv venv && \
/opt/recipes/venv/bin/python -m pip install --upgrade pip && \
venv/bin/pip install wheel==0.36.2 && \
venv/bin/pip install -r requirements.txt --no-cache-dir &&\
apk --purge del .build-deps
#Copy project and execute it.
COPY . ./
RUN chmod +x boot.sh
ENTRYPOINT ["/opt/recipes/boot.sh"]

View File

@@ -1,22 +1,690 @@
“Commons Clause” License Condition v1.0
The Software is provided to you by the Licensor under the License, as defined below, subject to the following condition.
Without limiting other conditions in the License, the grant of rights under the License will not include, and the License does not grant to you, the right to Sell the Software.
For purposes of the foregoing, “Sell” means practicing any or all of the rights granted to you under the License to provide to third parties, for a fee or other consideration (including without limitation fees for hosting or consulting/ support services related to the Software), a product or service whose value derives, entirely or substantially, from the functionality of the Software. Any license notice or attribution required by the License must also include this Commons Clause License Condition notice.
Software: https://github.com/vabene1111/recipes
License: GNU AFFERO GENERAL PUBLIC LICENSE v3
Licensor: https://github.com/vabene1111
GNU AFFERO GENERAL PUBLIC LICENSE
Version 3, 19 November 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU Affero General Public License is a free, copyleft license for
software and other kinds of works, specifically designed to ensure
cooperation with the community in the case of network server software.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
our General Public Licenses are intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
Developers that use our General Public Licenses protect your rights
with two steps: (1) assert copyright on the software, and (2) offer
you this License which gives you legal permission to copy, distribute
and/or modify the software.
A secondary benefit of defending all users' freedom is that
improvements made in alternate versions of the program, if they
receive widespread use, become available for other developers to
incorporate. Many developers of free software are heartened and
encouraged by the resulting cooperation. However, in the case of
software used on network servers, this result may fail to come about.
The GNU General Public License permits making a modified version and
letting the public access it on a server without ever releasing its
source code to the public.
The GNU Affero General Public License is designed specifically to
ensure that, in such cases, the modified source code becomes available
to the community. It requires the operator of a network server to
provide the source code of the modified version running there to the
users of that server. Therefore, public use of a modified version, on
a publicly accessible server, gives the public access to the source
code of the modified version.
An older license, called the Affero General Public License and
published by Affero, was designed to accomplish similar goals. This is
a different license, not a version of the Affero GPL, but Affero has
released a new version of the Affero GPL which permits relicensing under
this license.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU Affero General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Remote Network Interaction; Use with the GNU General Public License.
Notwithstanding any other provision of this License, if you modify the
Program, your modified version must prominently offer all users
interacting with it remotely through a computer network (if your version
supports such interaction) an opportunity to receive the Corresponding
Source of your version by providing access to the Corresponding Source
from a network server at no charge, through some standard or customary
means of facilitating copying of software. This Corresponding Source
shall include the Corresponding Source for any work covered by version 3
of the GNU General Public License that is incorporated pursuant to the
following paragraph.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the work with which it is combined will remain governed by version
3 of the GNU General Public License.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU Affero General Public License from time to time. Such new versions
will be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU Affero General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU Affero General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU Affero General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If your software can interact with users remotely through a computer
network, you should also make sure that it provides a way for users to
get its source. For example, if your program is a web application, its
interface could display a "Source" link that leads users to an archive
of the code. There are many ways you could offer source, and different
solutions will be better for different programs; see section 13 for the
specific requirements.
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU AGPL, see
<https://www.gnu.org/licenses/>.
---
### Prior 0.10.0
> All versions released before version 0.10. or 29.06.2020 were licensed under the following license
The MIT License (MIT)
Copyright (c) 2018
Copyright (c) 2018
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

124
README.md
View File

@@ -1,68 +1,74 @@
# Recipes ![CI](https://github.com/vabene1111/recipes/workflows/Continous%20Integration/badge.svg?branch=develop)
Recipes is a Django application to manage, tag and search recipes using either built in models or external storage providers hosting PDF's, Images or other files.
<h1 align="center">
<br>
<a href="https://app.tandoor.dev"><img src="https://github.com/vabene1111/recipes/raw/develop/docs/logo_color.svg" height="256px" width="256px"></a>
<br>
Tandoor Recipes
<br>
</h1>
<h4 align="center">The recipe manager that allows you to manage your ever growing collection of digital recipes.</h4>
<p align="center">
<img src="https://github.com/vabene1111/recipes/workflows/Continous%20Integration/badge.svg?branch=develop" >
<img src="https://img.shields.io/github/stars/vabene1111/recipes" >
<img src="https://img.shields.io/github/forks/vabene1111/recipes" >
<img src="https://img.shields.io/docker/pulls/vabene1111/recipes" >
</p>
<p align="center">
<a href="https://docs.tandoor.dev/install/docker/" target="_blank" rel="noopener noreferrer">Installation</a> •
<a href="https://docs.tandoor.dev/" target="_blank" rel="noopener noreferrer">Documentation</a> •
<a href="https://app.tandoor.dev/" target="_blank" rel="noopener noreferrer">Demo</a>
</p>
![Preview](docs/preview.png)
[More Screenshots](https://imgur.com/a/V01151p)
# Your Feedback
### Features
Share some information on how you use Tandoor to help me improve the application [Google Survey](https://forms.gle/qNfLK2tWTeWHe9Qd7)
- :package: **Sync** files with Dropbox and Nextcloud (more can easily be added)
- :mag: Powerful **search** with Djangos [TrigramSimilarity](https://docs.djangoproject.com/en/3.0/ref/contrib/postgres/search/#trigram-similarity)
- :label: Create and search for **tags**, assign them in batch to all files matching certain filters
- :page_facing_up: **Create recipes** locally within a nice, standardized web interface
- :iphone: Optimized for use on **mobile** devices like phones and tablets
- :shopping_cart: Generate **shopping** lists from recipes
- :calendar: Create a **Plan** on what to eat when
- :family: **Share** recipes with friends and comment on them to suggest or remember changes you made
- :whale: Easy setup with **Docker**
- :art: Customize your interface with **themes**
- :envelope: Export and import recipes from other users
- :heavy_plus_sign: Many more like recipe scaling, image compression, cookbooks, printing views, ...
## Features
This application is meant for people with a collection of recipes they want to share with family and friends or simply
store them in a nicely organized way. A basic permission system exists but this application is not meant to be run as a public page.
Some Documentation can be found [here](https://github.com/vabene1111/recipes/wiki)
# Installation
- 📦 **Sync** files with Dropbox and Nextcloud (more can easily be added)
- 🔍 Powerful **search** with Djangos [TrigramSimilarity](https://docs.djangoproject.com/en/3.0/ref/contrib/postgres/search/#trigram-similarity)
- 🏷️ Create and search for **tags**, assign them in batch to all files matching certain filters
- 📄 **Create recipes** locally within a nice, standardized web interface
- ⬇️ **Import recipes** from thousands of websites supporting [ld+json or microdata](https://schema.org/Recipe)
- 📱 Optimized for use on **mobile** devices like phones and tablets
- 🛒 Generate **shopping** lists from recipes
- 📆 Create a **Plan** on what to eat when
- 👪 **Share** recipes with friends and comment on them to suggest or remember changes you made
- ➗ automatically convert decimal units to **fractions** for those who like this
- 🐳 Easy setup with **Docker** and included examples for Kubernetes, Unraid and Synology
- 🎨 Customize your interface with **themes**
- ✉️ Export and import recipes from other users
- 🌍 localized in many languages thanks to the awesome community
- Many more like recipe scaling, image compression, cookbooks, printing views, ...
The docker image (`vabene1111/recipes`) simply exposes the application on port `8080`. You may choose any preferred installation method, the following are just examples to make it easier.
### Docker-Compose
2. Choose one of the included configurations [here](docs/docker).
2. Download the environment (config) file template and fill it out `wget https://raw.githubusercontent.com/vabene1111/recipes/develop/.env.template -O .env `
3. Start the container `docker-compose up -d`
4. Open the page to create the first user. Alternatively use `docker-compose exec web_recipes createsuperuser`
### Manual
**Python >= 3.8** is required to run this!
Copy `.env.template` to `.env` and fill in the missing values accordingly.
Make sure all variables are available to whatever serves your application.
Otherwise simply follow the instructions for any django based deployment
(for example [this one](http://uwsgi-docs.readthedocs.io/en/latest/tutorials/Django_and_nginx.html)).
## Updating
While intermediate updates can be skipped when updating please make sure to **read the release notes** in case some special action is required to update.
0. Before updating it is recommended to **create a backup!**
1. Stop the container using `docker-compose down`
2. Pull the latest image using `docker-compose pull`
3. Start the container again using `docker-compose up -d`
## Kubernetes
You can find a basic kubernetes setup [here](docs/k8s/). Please see the README in the folder for more detail.
## Contributing
Pull Requests and ideas are welcome, feel free to contribute in any way.
For any questions on how to work with django please refer to their excellent [documentation](https://www.djangoproject.com/start/).
### Translating
There is a [transifex project](https://www.transifex.com/django-recipes/django-cookbook/) project to enable community driven translations. If you want to contribute a new language or help maintain an already existing one feel free to create a transifex account (using the link above) and request to join the project.
It is also possible to provide the translations directly by creating a new language using `manage.py makemessages -l <language_code> -i venv`. Once finished simply open a PR with the changed files.
This application is meant for people with a collection of recipes they want to share with family and friends or simply
store them in a nicely organized way. A basic permission system exists but this application is not meant to be run as
a public page.
Documentation can be found [here](https://docs.tandoor.dev/).
While this application has been around for a while and is actively used by many (including myself), it is still considered
**beta** software that has a lot of rough edges and unpolished parts.
## License
This project is licensed under the MIT license. Even though it is not required to publish derivatives, I highly encourage pushing changes upstream and letting people profit from any work done on this project.
Beginning with version 0.10.0 the code in this repository is licensed under the [GNU AGPL v3](https://www.gnu.org/licenses/agpl-3.0.de.html) license with an
[common clause](https://commonsclause.com/) selling exception. See [LICENSE.md](https://github.com/vabene1111/recipes/blob/develop/LICENSE.md) for details.
> NOTE: There appears to be a whole range of legal issues with licensing anything else then the standard completely open licenses.
> I am in the process of getting some professional legal advice to sort out these issues.
> Please also see [Issue 238](https://github.com/vabene1111/recipes/issues/238) for some discussion and **reasoning** regarding the topic.
**Reasoning**
**This software and *all* its features are and will always be free for everyone to use and enjoy.**
The reason for the selling exception is that a significant amount of time was spend over multiple years to develop this software.
A payed hosted version which will be identical in features and code base to the software offered in this repository will
likely be released in the future (including all features needed to sell a hosted version as they might also be useful for personal use).
This will not only benefit me personally but also everyone who self-hosts this software as any profits made trough selling the hosted option
allow me to spend more time developing and improving the software for everyone. Selling exceptions are [approved by Richard Stallman](http://www.gnu.org/philosophy/selling-exceptions.en.html) and the
common clause license is very permissive (see the [FAQ](https://commonsclause.com/)).

10
SECURITY.md Normal file
View File

@@ -0,0 +1,10 @@
# Security Policy
## Supported Versions
Since this software is still considered beta/WIP support is always only given for the latest version. There are no backports of security or any other fixes.
## Reporting a Vulnerability
Please open a normal public issue if you have any security related concerns. If you feel like the issue should not be discussed in
public just open a generic issue and we will discuss further communitcation there (since GitHub does not allow everyone to create a security advisory :/).

View File

@@ -3,9 +3,10 @@ source venv/bin/activate
echo "Updating database"
python manage.py migrate
python manage.py collectstatic_js_reverse
python manage.py collectstatic --noinput
echo "Done"
chmod -R 755 /opt/recipes/mediafiles
exec gunicorn -b :8080 --access-logfile - --error-logfile - recipes.wsgi
exec gunicorn -b :8080 --access-logfile - --error-logfile - --log-level INFO recipes.wsgi

View File

@@ -1,9 +1,36 @@
from django.contrib import admin
from .models import *
from django.contrib.auth.admin import UserAdmin
from django.contrib.auth.models import User, Group
from .models import (Comment, CookLog, Food, Ingredient, InviteLink, Keyword,
MealPlan, MealType, NutritionInformation, Recipe,
RecipeBook, RecipeBookEntry, RecipeImport, ShareLink,
ShoppingList, ShoppingListEntry, ShoppingListRecipe,
Space, Step, Storage, Sync, SyncLog, Unit, UserPreference,
ViewLog, Supermarket, SupermarketCategory, SupermarketCategoryRelation,
ImportLog, TelegramBot, BookmarkletImport)
class CustomUserAdmin(UserAdmin):
def has_add_permission(self, request, obj=None):
return False
admin.site.unregister(User)
admin.site.register(User, CustomUserAdmin)
admin.site.unregister(Group)
class SpaceAdmin(admin.ModelAdmin):
list_display = ('name', 'created_by', 'message')
admin.site.register(Space, SpaceAdmin)
class UserPreferenceAdmin(admin.ModelAdmin):
list_display = ('name', 'theme', 'nav_color', 'default_page', 'search_style')
list_display = ('name', 'space', 'theme', 'nav_color', 'default_page', 'search_style',)
@staticmethod
def name(obj):
@@ -27,6 +54,18 @@ class SyncAdmin(admin.ModelAdmin):
admin.site.register(Sync, SyncAdmin)
class SupermarketCategoryInline(admin.TabularInline):
model = SupermarketCategoryRelation
class SupermarketAdmin(admin.ModelAdmin):
inlines = (SupermarketCategoryInline,)
admin.site.register(Supermarket, SupermarketAdmin)
admin.site.register(SupermarketCategory)
class SyncLogAdmin(admin.ModelAdmin):
list_display = ('sync', 'status', 'msg', 'created_at')
@@ -36,6 +75,13 @@ admin.site.register(SyncLog, SyncLogAdmin)
admin.site.register(Keyword)
class StepAdmin(admin.ModelAdmin):
list_display = ('name', 'type', 'order')
admin.site.register(Step, StepAdmin)
class RecipeAdmin(admin.ModelAdmin):
list_display = ('name', 'internal', 'created_by', 'storage')
@@ -47,14 +93,14 @@ class RecipeAdmin(admin.ModelAdmin):
admin.site.register(Recipe, RecipeAdmin)
admin.site.register(Unit)
admin.site.register(Ingredient)
admin.site.register(Food)
class RecipeIngredientAdmin(admin.ModelAdmin):
list_display = ('recipe', 'ingredient', 'amount', 'unit')
class IngredientAdmin(admin.ModelAdmin):
list_display = ('food', 'amount', 'unit')
admin.site.register(RecipeIngredient, RecipeIngredientAdmin)
admin.site.register(Ingredient, IngredientAdmin)
class CommentAdmin(admin.ModelAdmin):
@@ -94,7 +140,7 @@ admin.site.register(RecipeBookEntry, RecipeBookEntryAdmin)
class MealPlanAdmin(admin.ModelAdmin):
list_display = ('user', 'recipe', 'meal', 'date')
list_display = ('user', 'recipe', 'meal_type', 'date')
@staticmethod
def user(obj):
@@ -102,3 +148,90 @@ class MealPlanAdmin(admin.ModelAdmin):
admin.site.register(MealPlan, MealPlanAdmin)
class MealTypeAdmin(admin.ModelAdmin):
list_display = ('name', 'created_by', 'order')
admin.site.register(MealType, MealTypeAdmin)
class ViewLogAdmin(admin.ModelAdmin):
list_display = ('recipe', 'created_by', 'created_at')
admin.site.register(ViewLog, ViewLogAdmin)
class InviteLinkAdmin(admin.ModelAdmin):
list_display = (
'username', 'group', 'valid_until',
'created_by', 'created_at', 'used_by'
)
admin.site.register(InviteLink, InviteLinkAdmin)
class CookLogAdmin(admin.ModelAdmin):
list_display = ('recipe', 'created_by', 'created_at', 'rating', 'servings')
admin.site.register(CookLog, CookLogAdmin)
class ShoppingListRecipeAdmin(admin.ModelAdmin):
list_display = ('id', 'recipe', 'servings')
admin.site.register(ShoppingListRecipe, ShoppingListRecipeAdmin)
class ShoppingListEntryAdmin(admin.ModelAdmin):
list_display = ('id', 'food', 'unit', 'list_recipe', 'checked')
admin.site.register(ShoppingListEntry, ShoppingListEntryAdmin)
class ShoppingListAdmin(admin.ModelAdmin):
list_display = ('id', 'created_by', 'created_at')
admin.site.register(ShoppingList, ShoppingListAdmin)
class ShareLinkAdmin(admin.ModelAdmin):
list_display = ('recipe', 'created_by', 'uuid', 'created_at',)
admin.site.register(ShareLink, ShareLinkAdmin)
class NutritionInformationAdmin(admin.ModelAdmin):
list_display = ('id',)
admin.site.register(NutritionInformation, NutritionInformationAdmin)
class ImportLogAdmin(admin.ModelAdmin):
list_display = ('id', 'type', 'running', 'created_by', 'created_at',)
admin.site.register(ImportLog, ImportLogAdmin)
class TelegramBotAdmin(admin.ModelAdmin):
list_display = ('id', 'name', 'created_by',)
admin.site.register(TelegramBot, TelegramBotAdmin)
class BookmarkletImportAdmin(admin.ModelAdmin):
list_display = ('id', 'url', 'created_by', 'created_at',)
admin.site.register(BookmarkletImport, BookmarkletImportAdmin)

View File

@@ -1,54 +1,83 @@
import django_filters
from django.conf import settings
from django.contrib.postgres.search import TrigramSimilarity
from django.db.models import Q
from cookbook.forms import MultiSelectWidget
from cookbook.models import Recipe, Keyword, Ingredient
from django.conf import settings
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
class RecipeFilter(django_filters.FilterSet):
name = django_filters.CharFilter(method='filter_name')
keywords = django_filters.ModelMultipleChoiceFilter(queryset=Keyword.objects.all(), widget=MultiSelectWidget,
method='filter_keywords')
ingredients = django_filters.ModelMultipleChoiceFilter(queryset=Ingredient.objects.all(), widget=MultiSelectWidget,
method='filter_ingredients', label=_('Ingredients'))
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')
)
@staticmethod
def filter_keywords(queryset, name, value):
if not name == 'keywords':
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
for x in value:
queryset = queryset.filter(keywords=x)
return queryset
@staticmethod
def filter_ingredients(queryset, name, value):
if not name == 'ingredients':
@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
for x in value:
queryset = queryset.filter(recipeingredient__ingredient=x).distinct()
return queryset
@staticmethod
def filter_name(queryset, name, value):
if not name == 'name':
@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
if settings.DATABASES['default']['ENGINE'] == 'django.db.backends.postgresql_psycopg2':
queryset = queryset.annotate(similarity=TrigramSimilarity('name', value), ).filter(
Q(similarity__gt=0.1) | Q(name__icontains=value)).order_by('-similarity')
else:
queryset = queryset.filter(name__icontains=value)
return queryset
class Meta:
model = Recipe
fields = ['name', 'keywords', 'ingredients', 'internal']
class Meta:
model = Recipe
fields = ['name', 'keywords', 'foods', 'internal']
class IngredientFilter(django_filters.FilterSet):
name = django_filters.CharFilter(lookup_expr='icontains')
class FoodFilter(django_filters.FilterSet):
name = django_filters.CharFilter(lookup_expr='icontains')
class Meta:
model = Ingredient
fields = ['name']
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

@@ -1,10 +1,14 @@
from django import forms
from django.core.exceptions import ValidationError
from django.forms import widgets
from django.urls import reverse, reverse_lazy
from django.utils.translation import gettext as _
from django.utils.translation import gettext_lazy as _
from django_scopes import scopes_disabled
from django_scopes.forms import SafeModelChoiceField, SafeModelMultipleChoiceField
from emoji_picker.widgets import EmojiPickerTextInput
from .models import *
from .models import (Comment, Food, InviteLink, Keyword, MealPlan, Recipe,
RecipeBook, RecipeBookEntry, Storage, Sync, Unit, User,
UserPreference, SupermarketCategory, MealType, Space)
class SelectWidget(widgets.Select):
@@ -17,7 +21,8 @@ class MultiSelectWidget(widgets.SelectMultiple):
js = ('custom/js/form_multiselect.js',)
# yes there are some stupid browsers that still dont support this but i dont support people using these browsers
# Yes there are some stupid browsers that still dont support this but
# I dont support people using these browsers.
class DateWidget(forms.DateInput):
input_type = 'date'
@@ -31,13 +36,31 @@ class UserPreferenceForm(forms.ModelForm):
class Meta:
model = UserPreference
fields = ('default_unit', 'theme', 'nav_color', 'default_page', 'show_recent', 'search_style', 'plan_share')
fields = (
'default_unit', 'use_fractions', 'theme', 'nav_color',
'sticky_navbar', 'default_page', 'show_recent', 'search_style',
'plan_share', 'ingredient_decimals', 'shopping_auto_sync',
'comments'
)
help_texts = {
'nav_color': _('Color of the top navigation bar. Not all colors work with all themes, just try them out!'),
'default_unit': _('Default Unit to be used when inserting a new ingredient into a recipe.'),
'plan_share': _('Default user to share newly created meal plan entries with.'),
'show_recent': _('Show recently viewed recipes on search page.'),
# noqa: E501
'default_unit': _('Default Unit to be used when inserting a new ingredient into a recipe.'), # noqa: E501
'use_fractions': _(
'Enables support for fractions in ingredient amounts (e.g. convert decimals to fractions automatically)'),
# noqa: E501
'plan_share': _(
'Users with whom newly created meal plan/shopping list entries should be shared by default.'),
# 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
'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
),
'sticky_navbar': _('Makes the navbar stick to the top of the page.') # noqa: E501
}
widgets = {
@@ -59,12 +82,19 @@ class UserNameForm(forms.ModelForm):
class ExternalRecipeForm(forms.ModelForm):
file_path = forms.CharField(disabled=True, required=False)
storage = forms.ModelChoiceField(queryset=Storage.objects.all(), disabled=True, required=False)
file_uid = forms.CharField(disabled=True, required=False)
def __init__(self, *args, **kwargs):
space = kwargs.pop('space')
super().__init__(*args, **kwargs)
self.fields['keywords'].queryset = Keyword.objects.filter(space=space).all()
class Meta:
model = Recipe
fields = ('name', 'keywords', 'working_time', 'waiting_time', 'file_path', 'storage', 'file_uid')
fields = (
'name', 'description', 'servings', 'working_time', 'waiting_time',
'file_path', 'file_uid', 'keywords'
)
labels = {
'name': _('Name'),
@@ -75,92 +105,96 @@ class ExternalRecipeForm(forms.ModelForm):
'file_uid': _('Storage UID'),
}
widgets = {'keywords': MultiSelectWidget}
class InternalRecipeForm(forms.ModelForm):
ingredients = forms.CharField(widget=forms.HiddenInput(), required=False)
class Meta:
model = Recipe
fields = ('name', 'instructions', 'image', 'working_time', 'waiting_time', 'keywords')
labels = {
'name': _('Name'),
'keywords': _('Keywords'),
'instructions': _('Instructions'),
'working_time': _('Preparation time in minutes'),
'waiting_time': _('Waiting time (cooking/baking) in minutes'),
}
widgets = {'keywords': MultiSelectWidget}
help_texts = {
'instructions': _('You can use markdown to format this field. See the <a href="/docs/markdown/">docs here</a>')
field_classes = {
'keywords': SafeModelMultipleChoiceField,
}
class ShoppingForm(forms.Form):
recipe = forms.ModelMultipleChoiceField(
queryset=Recipe.objects.filter(internal=True).all(),
widget=MultiSelectWidget
)
markdown_format = forms.BooleanField(
help_text=_('Include <code>- [ ]</code> in list for easier usage in markdown based documents.'),
required=False,
initial=False
)
class ImportExportBase(forms.Form):
DEFAULT = 'DEFAULT'
PAPRIKA = 'PAPRIKA'
NEXTCLOUD = 'NEXTCLOUD'
MEALIE = 'MEALIE'
CHOWDOWN = 'CHOWDOWN'
SAFRON = 'SAFRON'
CHEFTAP = 'CHEFTAP'
PEPPERPLATE = 'PEPPERPLATE'
RECETTETEK = 'RECETTETEK'
RECIPESAGE = 'RECIPESAGE'
DOMESTICA = 'DOMESTICA'
MEALMASTER = 'MEALMASTER'
REZKONV = 'REZKONV'
type = forms.ChoiceField(choices=(
(DEFAULT, _('Default')), (PAPRIKA, 'Paprika'), (NEXTCLOUD, 'Nextcloud Cookbook'),
(MEALIE, 'Mealie'), (CHOWDOWN, 'Chowdown'), (SAFRON, 'Safron'), (CHEFTAP, 'ChefTap'),
(PEPPERPLATE, 'Pepperplate'), (RECETTETEK, 'RecetteTek'), (RECIPESAGE, 'Recipe Sage'), (DOMESTICA, 'Domestica'),
(MEALMASTER, 'MealMaster'), (REZKONV, 'RezKonv'),
))
class ExportForm(forms.Form):
recipe = forms.ModelChoiceField(
queryset=Recipe.objects.filter(internal=True).all(),
widget=SelectWidget
)
image = forms.BooleanField(
help_text=_('Export Base64 encoded image?'),
required=False
)
download = forms.BooleanField(
help_text=_('Download export directly or show on page?'),
required=False
)
class ImportForm(ImportExportBase):
files = forms.FileField(required=True, widget=forms.ClearableFileInput(attrs={'multiple': True}))
duplicates = forms.BooleanField(help_text=_(
'To prevent duplicates recipes with the same name as existing ones are ignored. Check this box to import everything.'),
required=False)
class ImportForm(forms.Form):
recipe = forms.CharField(widget=forms.Textarea, help_text=_('Simply paste a JSON export into this textarea and click import.'))
class ExportForm(ImportExportBase):
recipes = forms.ModelMultipleChoiceField(widget=MultiSelectWidget, queryset=Recipe.objects.none())
all = forms.BooleanField(required=False)
def __init__(self, *args, **kwargs):
space = kwargs.pop('space')
super().__init__(*args, **kwargs)
self.fields['recipes'].queryset = Recipe.objects.filter(space=space).all()
class UnitMergeForm(forms.Form):
prefix = 'unit'
new_unit = forms.ModelChoiceField(
queryset=Unit.objects.all(),
new_unit = SafeModelChoiceField(
queryset=Unit.objects.none(),
widget=SelectWidget,
label=_('New Unit'),
help_text=_('New unit that other gets replaced by.'),
)
old_unit = forms.ModelChoiceField(
queryset=Unit.objects.all(),
old_unit = SafeModelChoiceField(
queryset=Unit.objects.none(),
widget=SelectWidget,
label=_('Old Unit'),
help_text=_('Unit that should be replaced.'),
)
def __init__(self, *args, **kwargs):
space = kwargs.pop('space')
super().__init__(*args, **kwargs)
self.fields['new_unit'].queryset = Unit.objects.filter(space=space).all()
self.fields['old_unit'].queryset = Unit.objects.filter(space=space).all()
class IngredientMergeForm(forms.Form):
prefix = 'ingredient'
new_ingredient = forms.ModelChoiceField(
queryset=Ingredient.objects.all(),
class FoodMergeForm(forms.Form):
prefix = 'food'
new_food = SafeModelChoiceField(
queryset=Food.objects.none(),
widget=SelectWidget,
label=_('New Ingredient'),
help_text=_('New ingredient that other gets replaced by.'),
label=_('New Food'),
help_text=_('New food that other gets replaced by.'),
)
old_ingredient = forms.ModelChoiceField(
queryset=Ingredient.objects.all(),
old_food = SafeModelChoiceField(
queryset=Food.objects.none(),
widget=SelectWidget,
label=_('Old Ingredient'),
help_text=_('Ingredient that should be replaced.'),
label=_('Old Food'),
help_text=_('Food that should be replaced.'),
)
def __init__(self, *args, **kwargs):
space = kwargs.pop('space')
super().__init__(*args, **kwargs)
self.fields['new_food'].queryset = Food.objects.filter(space=space).all()
self.fields['old_food'].queryset = Food.objects.filter(space=space).all()
class CommentForm(forms.ModelForm):
prefix = 'comment'
@@ -184,25 +218,46 @@ class KeywordForm(forms.ModelForm):
widgets = {'icon': EmojiPickerTextInput}
class IngredientForm(forms.ModelForm):
class FoodForm(forms.ModelForm):
def __init__(self, *args, **kwargs):
space = kwargs.pop('space')
super().__init__(*args, **kwargs)
self.fields['recipe'].queryset = Recipe.objects.filter(space=space).all()
self.fields['supermarket_category'].queryset = SupermarketCategory.objects.filter(space=space).all()
class Meta:
model = Ingredient
fields = ('name', 'recipe')
model = Food
fields = ('name', 'description', 'ignore_shopping', 'recipe', 'supermarket_category')
widgets = {'recipe': SelectWidget}
field_classes = {
'recipe': SafeModelChoiceField,
'supermarket_category': SafeModelChoiceField,
}
class StorageForm(forms.ModelForm):
username = forms.CharField(widget=forms.TextInput(attrs={'autocomplete': 'new-password'}), required=False)
password = forms.CharField(widget=forms.TextInput(attrs={'autocomplete': 'new-password', 'type': 'password'}),
required=False,
help_text=_('Leave empty for dropbox and enter app password for nextcloud.'))
token = forms.CharField(widget=forms.TextInput(attrs={'autocomplete': 'new-password', 'type': 'password'}),
required=False,
help_text=_('Leave empty for nextcloud and enter api token for dropbox.'))
username = forms.CharField(
widget=forms.TextInput(attrs={'autocomplete': 'new-password'}),
required=False
)
password = forms.CharField(
widget=forms.TextInput(attrs={'autocomplete': 'new-password', 'type': 'password'}),
required=False,
help_text=_('Leave empty for dropbox and enter app password for nextcloud.')
)
token = forms.CharField(
widget=forms.TextInput(
attrs={'autocomplete': 'new-password', 'type': 'password'}
),
required=False,
help_text=_('Leave empty for nextcloud and enter api token for dropbox.')
)
class Meta:
model = Storage
fields = ('name', 'method', 'username', 'password', 'token', 'url')
fields = ('name', 'method', 'username', 'password', 'token', 'url', 'path')
help_texts = {
'url': _(
@@ -213,24 +268,56 @@ class StorageForm(forms.ModelForm):
class RecipeBookEntryForm(forms.ModelForm):
prefix = 'bookmark'
def __init__(self, *args, **kwargs):
space = kwargs.pop('space')
super().__init__(*args, **kwargs)
self.fields['book'].queryset = RecipeBook.objects.filter(space=space).all()
class Meta:
model = RecipeBookEntry
fields = ('book',)
field_classes = {
'book': SafeModelChoiceField,
}
class SyncForm(forms.ModelForm):
def __init__(self, *args, **kwargs):
space = kwargs.pop('space')
super().__init__(*args, **kwargs)
self.fields['storage'].queryset = Storage.objects.filter(space=space).all()
class Meta:
model = Sync
fields = ('storage', 'path', 'active')
field_classes = {
'storage': SafeModelChoiceField,
}
class BatchEditForm(forms.Form):
search = forms.CharField(label=_('Search String'))
keywords = forms.ModelMultipleChoiceField(queryset=Keyword.objects.all().order_by('id'), required=False,
widget=MultiSelectWidget)
keywords = forms.ModelMultipleChoiceField(
queryset=Keyword.objects.none(),
required=False,
widget=MultiSelectWidget
)
def __init__(self, *args, **kwargs):
space = kwargs.pop('space')
super().__init__(*args, **kwargs)
self.fields['keywords'].queryset = Keyword.objects.filter(space=space).all().order_by('id')
class ImportRecipeForm(forms.ModelForm):
def __init__(self, *args, **kwargs):
space = kwargs.pop('space')
super().__init__(*args, **kwargs)
self.fields['keywords'].queryset = Keyword.objects.filter(space=space).all()
class Meta:
model = Recipe
fields = ('name', 'keywords', 'file_path', 'file_uid')
@@ -242,38 +329,133 @@ class ImportRecipeForm(forms.ModelForm):
'file_uid': _('File ID'),
}
widgets = {'keywords': MultiSelectWidget}
field_classes = {
'keywords': SafeModelChoiceField,
}
class RecipeBookForm(forms.ModelForm):
def __init__(self, *args, **kwargs):
space = kwargs.pop('space')
super().__init__(*args, **kwargs)
self.fields['shared'].queryset = User.objects.filter(userpreference__space=space).all()
class Meta:
model = RecipeBook
fields = ('name', 'icon', 'description', 'shared')
widgets = {'icon': EmojiPickerTextInput, 'shared': MultiSelectWidget}
field_classes = {
'shared': SafeModelMultipleChoiceField,
}
class MealPlanForm(forms.ModelForm):
def __init__(self, *args, **kwargs):
space = kwargs.pop('space')
super().__init__(*args, **kwargs)
self.fields['recipe'].queryset = Recipe.objects.filter(space=space).all()
self.fields['meal_type'].queryset = MealType.objects.filter(space=space).all()
self.fields['shared'].queryset = User.objects.filter(userpreference__space=space).all()
def clean(self):
cleaned_data = super(MealPlanForm, self).clean()
if cleaned_data['title'] == '' and cleaned_data['recipe'] is None:
raise forms.ValidationError(_('You must provide at least a recipe or a title.'))
raise forms.ValidationError(
_('You must provide at least a recipe or a title.')
)
return cleaned_data
class Meta:
model = MealPlan
fields = ('recipe', 'title', 'meal', 'note', 'date', 'shared')
fields = (
'recipe', 'title', 'meal_type', 'note',
'servings', 'date', 'shared'
)
help_texts = {
'shared': _('You can list default users to share recipes with in the settings.'),
'shared': _('You can list default users to share recipes with in the settings.'), # noqa: E501
'note': _('You can use markdown to format this field. See the <a href="/docs/markdown/">docs here</a>')
# noqa: E501
}
widgets = {'recipe': SelectWidget, 'date': DateWidget, 'shared': MultiSelectWidget}
widgets = {
'recipe': SelectWidget,
'date': DateWidget,
'shared': MultiSelectWidget
}
field_classes = {
'recipe': SafeModelChoiceField,
'meal_type': SafeModelChoiceField,
'shared': SafeModelMultipleChoiceField,
}
class SuperUserForm(forms.Form):
class InviteLinkForm(forms.ModelForm):
def __init__(self, *args, **kwargs):
user = kwargs.pop('user')
super().__init__(*args, **kwargs)
self.fields['space'].queryset = Space.objects.filter(created_by=user).all()
def clean(self):
space = self.cleaned_data['space']
if space.max_users != 0 and (UserPreference.objects.filter(space=space).count() + InviteLink.objects.filter(space=space).count()) >= space.max_users:
raise ValidationError(_('Maximum number of users for this space reached.'))
def clean_email(self):
email = self.cleaned_data['email']
with scopes_disabled():
if email != '' and User.objects.filter(email=email).exists():
raise ValidationError(_('Email address already taken!'))
return email
def clean_username(self):
username = self.cleaned_data['username']
with scopes_disabled():
if username != '' and (User.objects.filter(username=username).exists() or InviteLink.objects.filter(username=username).exists()):
raise ValidationError(_('Username already taken!'))
return username
class Meta:
model = InviteLink
fields = ('username', 'email', 'group', 'valid_until', 'space')
help_texts = {
'username': _('A username is not required, if left blank the new user can choose one.'),
'email': _('An email address is not required but if present the invite link will be send to the user.')
}
field_classes = {
'space': SafeModelChoiceField,
}
class SpaceCreateForm(forms.Form):
prefix = 'create'
name = forms.CharField()
password = forms.CharField(widget=forms.TextInput(attrs={'autocomplete': 'new-password', 'type': 'password'}))
password_confirm = forms.CharField(widget=forms.TextInput(attrs={'autocomplete': 'new-password', 'type': 'password'}))
def clean_name(self):
name = self.cleaned_data['name']
with scopes_disabled():
if Space.objects.filter(name=name).exists():
raise ValidationError(_('Name already taken.'))
return name
class SpaceJoinForm(forms.Form):
prefix = 'join'
token = forms.CharField()
class UserCreateForm(forms.Form):
name = forms.CharField(label='Username')
password = forms.CharField(
widget=forms.TextInput(
attrs={'autocomplete': 'new-password', 'type': 'password'}
)
)
password_confirm = forms.CharField(
widget=forms.TextInput(
attrs={'autocomplete': 'new-password', 'type': 'password'}
)
)

View File

@@ -0,0 +1,32 @@
import datetime
from django.conf import settings
from allauth.account.adapter import DefaultAccountAdapter
from django.contrib import messages
from django.core.cache import caches
from gettext import gettext as _
class AllAuthCustomAdapter(DefaultAccountAdapter):
def is_open_for_signup(self, request):
"""
Whether to allow sign ups.
"""
if request.resolver_match.view_name == 'account_signup' and not settings.ENABLE_SIGNUP:
return False
else:
return super(AllAuthCustomAdapter, self).is_open_for_signup(request)
# disable password reset for now
def send_mail(self, template_prefix, email, context):
if settings.EMAIL_HOST != '':
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)
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:
pass

View File

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

View File

@@ -1 +1,6 @@
from cookbook.helper.dal import *
import cookbook.helper.dal
from cookbook.helper.AllAuthCustomAdapter import AllAuthCustomAdapter
__all__ = [
'dal',
]

View File

@@ -1,27 +1,16 @@
from cookbook.models import Food, Keyword, Recipe, Unit
from dal import autocomplete
from cookbook.models import Keyword, RecipeIngredient, Recipe, Unit, Ingredient
class BaseAutocomplete(autocomplete.Select2QuerySetView):
model = None
class KeywordAutocomplete(autocomplete.Select2QuerySetView):
def get_queryset(self):
if not self.request.user.is_authenticated:
return Keyword.objects.none()
return self.model.objects.none()
qs = Keyword.objects.all()
if self.q:
qs = qs.filter(name__istartswith=self.q)
return qs
class IngredientsAutocomplete(autocomplete.Select2QuerySetView):
def get_queryset(self):
if not self.request.user.is_authenticated:
return Ingredient.objects.none()
qs = Ingredient.objects.all()
qs = self.model.objects.filter(space=self.request.space).all()
if self.q:
qs = qs.filter(name__icontains=self.q)
@@ -29,27 +18,17 @@ class IngredientsAutocomplete(autocomplete.Select2QuerySetView):
return qs
class RecipeAutocomplete(autocomplete.Select2QuerySetView):
def get_queryset(self):
if not self.request.user.is_authenticated:
return Recipe.objects.none()
qs = Recipe.objects.all()
if self.q:
qs = qs.filter(name__icontains=self.q)
return qs
class KeywordAutocomplete(BaseAutocomplete):
model = Keyword
class UnitAutocomplete(autocomplete.Select2QuerySetView):
def get_queryset(self):
if not self.request.user.is_authenticated:
return Unit.objects.none()
class IngredientsAutocomplete(BaseAutocomplete):
model = Food
qs = Unit.objects.all()
if self.q:
qs = qs.filter(name__icontains=self.q)
class RecipeAutocomplete(BaseAutocomplete):
model = Recipe
return qs
class UnitAutocomplete(BaseAutocomplete):
model = Unit

View File

@@ -0,0 +1,176 @@
import string
import unicodedata
from cookbook.models import Unit, Food
def parse_fraction(x):
if len(x) == 1 and 'fraction' in unicodedata.decomposition(x):
frac_split = unicodedata.decomposition(x[-1:]).split()
return (float((frac_split[1]).replace('003', ''))
/ float((frac_split[3]).replace('003', '')))
else:
frac_split = x.split('/')
if not len(frac_split) == 2:
raise ValueError
try:
return int(frac_split[0]) / int(frac_split[1])
except ZeroDivisionError:
raise ValueError
def parse_amount(x):
amount = 0
unit = ''
did_check_frac = False
end = 0
while (
end < len(x)
and (
x[end] in string.digits
or (
(x[end] == '.' or x[end] == ',' or x[end] == '/')
and end + 1 < len(x)
and x[end + 1] in string.digits
)
)
):
end += 1
if end > 0:
if "/" in x[:end]:
amount = parse_fraction(x[:end])
else:
amount = float(x[:end].replace(',', '.'))
else:
amount = parse_fraction(x[0])
end += 1
did_check_frac = True
if end < len(x):
if did_check_frac:
unit = x[end:]
else:
try:
amount += parse_fraction(x[end])
unit = x[end + 1:]
except ValueError:
unit = x[end:]
return amount, unit
def parse_ingredient_with_comma(tokens):
ingredient = ''
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)
else:
ingredient = ' '.join(tokens[:start + 1])[:-1]
note = ' '.join(tokens[start + 1:])
return ingredient, note
def parse_ingredient(tokens):
ingredient = ''
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 parse_ingredient_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:
start -= 1
if start == 0:
# the whole list is wrapped in brackets -> assume it is an error (e.g. assumed first argument was the unit) # noqa: E501
raise ValueError
elif start < 0:
# no opening bracket anywhere -> just ignore the last bracket
ingredient, note = parse_ingredient_with_comma(tokens)
else:
# opening bracket found -> split in ingredient and note, remove brackets from note # noqa: E501
note = ' '.join(tokens[start:])[1:-1]
ingredient = ' '.join(tokens[:start])
else:
ingredient, note = parse_ingredient_with_comma(tokens)
return ingredient, note
def parse(x):
# initialize default values
amount = 0
unit = ''
ingredient = ''
note = ''
tokens = x.split()
if len(tokens) == 1:
# there only is one argument, that must be the ingredient
ingredient = tokens[0]
else:
try:
# try to parse first argument as amount
amount, unit = parse_amount(tokens[0])
# only try to parse second argument as amount if there are at least
# three arguments if it already has a unit there can't be
# a fraction for the amount
if len(tokens) > 2:
try:
if not unit == '':
# a unit is already found, no need to try the second argument for a fraction # 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 # noqa: E501
raise ValueError
# try to parse second argument as amount and add that, in case of '2 1/2' or '2 ½' # noqa: E501
amount += 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:
ingredient, note = parse_ingredient(tokens[3:])
unit = tokens[2]
except ValueError:
ingredient, note = parse_ingredient(tokens[2:])
else:
ingredient, note = parse_ingredient(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:
ingredient, note = parse_ingredient(tokens[2:])
unit = tokens[1]
except ValueError:
ingredient, note = parse_ingredient(tokens[1:])
else:
ingredient, note = parse_ingredient(tokens[1:])
else:
# only two arguments, first one is the amount
# which means this is the ingredient
ingredient = tokens[1]
except ValueError:
try:
# can't parse first argument as amount
# -> no unit -> parse everything as ingredient
ingredient, note = parse_ingredient(tokens)
except ValueError:
ingredient = ' '.join(tokens[1:])
return amount, unit.strip(), ingredient.strip(), note.strip()
# small utility functions to prevent emtpy unit/food creation
def get_unit(unit, space):
if len(unit) > 0:
u, created = Unit.objects.get_or_create(name=unit, space=space)
return u
return None
def get_food(food, space):
if len(food) > 0:
f, created = Food.objects.get_or_create(name=food, space=space)
return f
return None

View File

@@ -1,5 +1,4 @@
import markdown
from markdown.treeprocessors import Treeprocessor
@@ -20,5 +19,10 @@ class StyleTreeprocessor(Treeprocessor):
class MarkdownFormatExtension(markdown.Extension):
def extendMarkdown(self, md, md_globals):
md.treeprocessors.register(StyleTreeprocessor(), 'StyleTreeprocessor', 10)
# md_ globals deprecated - see here:
def extendMarkdown(self, md):
md.treeprocessors.register(
StyleTreeprocessor(),
'StyleTreeprocessor',
10
)

View File

@@ -1,4 +1,5 @@
"""A more liberal autolinker
"""
A more liberal autolinker
Inspired by Django's urlize function.
@@ -45,27 +46,30 @@ URLIZE_RE = '(%s)' % '|'.join([
r'[^(<\s]+\.(?:com|net|org)\b',
])
class UrlizePattern(markdown.inlinepatterns.Pattern):
""" Return a link Element given an autolink (`http://example/com`). """
def handleMatch(self, m):
url = m.group(2)
if url.startswith('<'):
url = url[1:-1]
text = url
if not url.split('://')[0] in ('http','https','ftp'):
if '@' in url and not '/' in url:
if not url.split('://')[0] in ('http', 'https', 'ftp'):
if '@' in url and '/' not in url:
url = 'mailto:' + url
else:
url = 'http://' + url
el = markdown.util.etree.Element("a")
el.set('href', url)
el.text = markdown.util.AtomicString(text)
return el
class UrlizeExtension(markdown.Extension):
""" Urlize Extension for Python-Markdown. """
@@ -73,9 +77,12 @@ class UrlizeExtension(markdown.Extension):
""" Replace autolink with UrlizePattern """
md.inlinePatterns['autolink'] = UrlizePattern(URLIZE_RE, md)
def makeExtension(*args, **kwargs):
return UrlizeExtension(*args, **kwargs)
if __name__ == "__main__":
import doctest
doctest.testmod()

View File

@@ -0,0 +1,9 @@
from cookbook.helper.permission_helper import CustomIsUser
class PermissionConfig:
BOOKS = {
'owner': True,
'groups': ['user'],
'drf': [CustomIsUser],
}

View File

@@ -1,14 +1,27 @@
"""
Source: https://djangosnippets.org/snippets/1703/
"""
from django.views.generic.detail import SingleObjectTemplateResponseMixin
from django.views.generic.edit import ModelFormMixin
from cookbook.models import ShareLink
from django.contrib import messages
from django.contrib.auth.decorators import user_passes_test
from django.utils.translation import gettext as _
from django.core.exceptions import ValidationError
from django.http import HttpResponseRedirect
from django.urls import reverse_lazy, reverse
from django.urls import reverse, reverse_lazy
from django.utils.translation import gettext as _
from rest_framework import permissions
from rest_framework.permissions import SAFE_METHODS
def get_allowed_groups(groups_required):
"""
Builds a list of all groups equal or higher to the provided groups
This means checking for guest will also allow admins to access
:param groups_required: list or tuple of groups
:return: tuple of groups
"""
groups_allowed = tuple(groups_required)
if 'guest' in groups_required:
groups_allowed = groups_allowed + ('user', 'admin')
@@ -17,17 +30,85 @@ def get_allowed_groups(groups_required):
return groups_allowed
def group_required(*groups_required):
"""Requires user membership in at least one of the groups passed in."""
def has_group_permission(user, groups):
"""
Tests if a given user is member of a certain group (or any higher group)
Superusers always bypass permission checks.
Unauthenticated users cant be member of any group thus always return false.
: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
"""
if not user.is_authenticated:
return False
groups_allowed = get_allowed_groups(groups)
if user.is_authenticated:
if bool(user.groups.filter(name__in=groups_allowed)):
return True
return False
def in_groups(u):
groups_allowed = get_allowed_groups(groups_required)
if u.is_authenticated:
if u.is_superuser | bool(u.groups.filter(name__in=groups_allowed)):
return True
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
"""
if not user.is_authenticated:
return False
try:
return obj.get_owner() == user
except:
return False
return user_passes_test(in_groups, login_url='index')
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
"""
# TODO this could be improved/cleaned up by adding
# share checks for relevant objects
if not user.is_authenticated:
return False
return user in obj.get_shared()
def share_link_valid(recipe, share):
"""
Verifies the validity of a share uuid
:param recipe: recipe object
:param share: share uuid
:return: true if a share link with the given recipe and uuid exists
"""
try:
return True if ShareLink.objects.filter(recipe=recipe, uuid=share).exists() else False
except ValidationError:
return False
# Django Views
def group_required(*groups_required):
"""
Decorator that tests the requesting user to be member
of at least one of the provided groups or higher level groups
:param groups_required: list of required groups
:return: true if member of group, false otherwise
"""
def in_groups(u):
return has_group_permission(u, groups_required)
return user_passes_test(in_groups, login_url='view_no_perm')
class GroupRequiredMixin(object):
@@ -38,18 +119,21 @@ class GroupRequiredMixin(object):
groups_required = None
def dispatch(self, request, *args, **kwargs):
if not request.user.is_authenticated:
messages.add_message(request, messages.ERROR, _('You are not logged in and therefore cannot view this page!'))
return HttpResponseRedirect(reverse_lazy('login'))
else:
if not request.user.is_superuser:
group_allowed = get_allowed_groups(self.groups_required)
user_groups = []
for group in request.user.groups.values_list('name', flat=True):
user_groups.append(group)
if len(set(user_groups).intersection(group_allowed)) <= 0:
messages.add_message(request, messages.ERROR, _('You do not have the required permissions to view this page!'))
return HttpResponseRedirect(reverse_lazy('index'))
if not has_group_permission(request.user, self.groups_required):
if not request.user.is_authenticated:
messages.add_message(request, messages.ERROR, _('You are not logged in and therefore cannot view this page!'))
return HttpResponseRedirect(reverse_lazy('account_login') + '?next=' + request.path)
else:
messages.add_message(request, messages.ERROR, _('You do not have the required permissions to view this page!'))
return HttpResponseRedirect(reverse_lazy('index'))
try:
obj = self.get_object()
if obj.get_space() != request.space:
messages.add_message(request, messages.ERROR, _('You do not have the required permissions to view this page!'))
return HttpResponseRedirect(reverse_lazy('index'))
except AttributeError:
pass
return super(GroupRequiredMixin, self).dispatch(request, *args, **kwargs)
@@ -58,11 +142,103 @@ class OwnerRequiredMixin(object):
def dispatch(self, request, *args, **kwargs):
if not request.user.is_authenticated:
messages.add_message(request, messages.ERROR, _('You are not logged in and therefore cannot view this page!'))
return HttpResponseRedirect(reverse_lazy('login'))
return HttpResponseRedirect(reverse_lazy('account_login') + '?next=' + request.path)
else:
obj = self.get_object()
if not (obj.created_by == request.user or request.user.is_superuser):
messages.add_message(request, messages.ERROR, _('You cannot interact with this object as its not owned by you!'))
if not is_object_owner(request.user, self.get_object()):
messages.add_message(request, messages.ERROR, _('You cannot interact with this object as it is not owned by you!'))
return HttpResponseRedirect(reverse('index'))
try:
obj = self.get_object()
if obj.get_space() != request.space:
messages.add_message(request, messages.ERROR, _('You do not have the required permissions to view this page!'))
return HttpResponseRedirect(reverse_lazy('index'))
except AttributeError:
pass
return super(OwnerRequiredMixin, self).dispatch(request, *args, **kwargs)
# Django Rest Framework Permission classes
class CustomIsOwner(permissions.BasePermission):
"""
Custom permission class for django rest framework views
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
def has_permission(self, request, view):
return request.user.is_authenticated
def has_object_permission(self, request, view, obj):
return is_object_owner(request.user, obj)
# TODO function duplicate/too similar name
class CustomIsShared(permissions.BasePermission):
"""
Custom permission class for django rest framework views
verifies user is shared for the object he is trying to access
"""
message = _('You cannot interact with this object as it is not owned by you!') # noqa: E501
def has_permission(self, request, view):
return request.user.is_authenticated
def has_object_permission(self, request, view, obj):
return is_object_shared(request.user, obj)
class CustomIsGuest(permissions.BasePermission):
"""
Custom permission class for django rest framework views
verifies the user is member of at least the group: guest
"""
message = _('You do not have the required permissions to view this page!')
def has_permission(self, request, view):
return has_group_permission(request.user, ['guest'])
def has_object_permission(self, request, view, obj):
return has_group_permission(request.user, ['guest'])
class CustomIsUser(permissions.BasePermission):
"""
Custom permission class for django rest framework views
verifies the user is member of at least the group: user
"""
message = _('You do not have the required permissions to view this page!')
def has_permission(self, request, view):
return has_group_permission(request.user, ['user'])
class CustomIsAdmin(permissions.BasePermission):
"""
Custom permission class for django rest framework views
verifies the user is member of at least the group: admin
"""
message = _('You do not have the required permissions to view this page!')
def has_permission(self, request, view):
return has_group_permission(request.user, ['admin'])
class CustomIsShare(permissions.BasePermission):
"""
Custom permission class for django rest framework views
verifies the requesting user provided a valid share link
"""
message = _('You do not have the required permissions to view this page!')
def has_permission(self, request, view):
return 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)
return False

View File

@@ -0,0 +1,193 @@
import json
import re
from bs4 import BeautifulSoup
from bs4.element import Tag
from cookbook.helper import recipe_url_import as helper
from cookbook.helper.scrapers.scrapers import text_scraper
from json import JSONDecodeError
from recipe_scrapers._utils import get_host_name, normalize_string
from urllib.parse import unquote
def get_recipe_from_source(text, url, space):
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_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)
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)
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)
recipe_json = helper.get_from_scraper(scrape, space)
for el in parse_list:
temp_tree = []
if isinstance(el, Tag):
try:
el = json.loads(el.string)
except TypeError:
continue
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)
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_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
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:
pass
return el

View File

@@ -0,0 +1,72 @@
from datetime import datetime, timedelta
from functools import reduce
from django.contrib.postgres.search import TrigramSimilarity
from django.db.models import Q, Case, When, Value
from django.forms import IntegerField
from cookbook.models import ViewLog
from recipes import settings
def search_recipes(request, queryset, params):
search_string = params.get('query', '')
search_keywords = params.getlist('keywords', [])
search_foods = params.getlist('foods', [])
search_books = params.getlist('books', [])
search_keywords_or = params.get('keywords_or', True)
search_foods_or = params.get('foods_or', True)
search_books_or = params.get('books_or', True)
search_internal = params.get('internal', None)
search_random = params.get('random', False)
search_last_viewed = int(params.get('last_viewed', 0))
if search_last_viewed > 0:
last_viewed_recipes = ViewLog.objects.filter(created_by=request.user, space=request.space,
created_at__gte=datetime.now() - timedelta(days=14)).order_by('pk').values_list('recipe__pk', flat=True).distinct()
return queryset.filter(pk__in=last_viewed_recipes[len(last_viewed_recipes)-search_last_viewed:])
queryset = queryset.annotate(
new_recipe=Case(When(created_at__gte=(datetime.now() - timedelta(days=7)), then=Value(100)),
default=Value(0), )).order_by('-new_recipe', 'name')
if settings.DATABASES['default']['ENGINE'] in ['django.db.backends.postgresql_psycopg2',
'django.db.backends.postgresql']:
queryset = queryset.annotate(similarity=TrigramSimilarity('name', search_string), ).filter(
Q(similarity__gt=0.1) | Q(name__unaccent__icontains=search_string)).order_by('-similarity')
else:
queryset = queryset.filter(name__icontains=search_string)
if len(search_keywords) > 0:
if search_keywords_or == 'true':
queryset = queryset.filter(keywords__id__in=search_keywords)
else:
for k in search_keywords:
queryset = queryset.filter(keywords__id=k)
if len(search_foods) > 0:
if search_foods_or == 'true':
queryset = queryset.filter(steps__ingredients__food__id__in=search_foods)
else:
for k in search_foods:
queryset = queryset.filter(steps__ingredients__food__id=k)
if len(search_books) > 0:
if search_books_or == 'true':
queryset = queryset.filter(recipebookentry__book__id__in=search_books)
else:
for k in search_books:
queryset = queryset.filter(recipebookentry__book__id=k)
queryset = queryset.distinct()
if search_internal == 'true':
queryset = queryset.filter(internal=True)
if search_random == 'true':
queryset = queryset.order_by("?")
return queryset

View File

@@ -0,0 +1,361 @@
import random
import re
from isodate import parse_duration as iso_parse_duration
from isodate.isoerror import ISO8601Error
from recipe_scrapers._exceptions import ElementNotFoundInHtml
from cookbook.helper.ingredient_parser import parse as parse_single_ingredient
from cookbook.models import Keyword
from django.utils.dateparse import parse_duration
from html import unescape
from recipe_scrapers._schemaorg import SchemaOrgException
from recipe_scrapers._utils import get_minutes
def get_from_scraper(scrape, space):
# converting the scrape_me object to the existing json format based on ld+json
recipe_json = {}
try:
recipe_json['name'] = parse_name(scrape.title() or None)
except Exception:
recipe_json['name'] = None
if not recipe_json['name']:
try:
recipe_json['name'] = scrape.schema.data.get('name') or ''
except Exception:
recipe_json['name'] = ''
try:
description = scrape.schema.data.get("description") or ''
except Exception:
description = ''
recipe_json['description'] = parse_description(description)
try:
servings = scrape.yields() or None
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)
try:
recipe_json['prepTime'] = get_minutes(scrape.schema.data.get("prepTime")) or 0
except Exception:
recipe_json['prepTime'] = 0
try:
recipe_json['cookTime'] = get_minutes(scrape.schema.data.get("cookTime")) or 0
except Exception:
recipe_json['cookTime'] = 0
if recipe_json['cookTime'] + recipe_json['prepTime'] == 0:
try:
recipe_json['prepTime'] = get_minutes(scrape.total_time()) or 0
except Exception:
try:
get_minutes(scrape.schema.data.get("totalTime")) or 0
except Exception:
pass
try:
recipe_json['image'] = parse_image(scrape.image()) or None
except Exception:
recipe_json['image'] = None
if not recipe_json['image']:
try:
recipe_json['image'] = parse_image(scrape.schema.data.get('image')) or ''
except Exception:
recipe_json['image'] = ''
keywords = []
try:
if scrape.schema.data.get("keywords"):
keywords += listify_keywords(scrape.schema.data.get("keywords"))
except Exception:
pass
try:
if scrape.schema.data.get('recipeCategory'):
keywords += listify_keywords(scrape.schema.data.get("recipeCategory"))
except Exception:
pass
try:
if scrape.schema.data.get('recipeCuisine'):
keywords += listify_keywords(scrape.schema.data.get("recipeCuisine"))
except Exception:
pass
try:
recipe_json['keywords'] = parse_keywords(list(set(map(str.casefold, keywords))), space)
except AttributeError:
recipe_json['keywords'] = keywords
try:
ingredients = []
for x in scrape.ingredients():
try:
amount, unit, ingredient, note = parse_single_ingredient(x)
if ingredient:
ingredients.append(
{
'amount': amount,
'unit': {
'text': unit,
'id': random.randrange(10000, 99999)
},
'ingredient': {
'text': ingredient,
'id': random.randrange(10000, 99999)
},
'note': note,
'original': x
}
)
except Exception:
ingredients.append(
{
'amount': 0,
'unit': {
'text': '',
'id': random.randrange(10000, 99999)
},
'ingredient': {
'text': x,
'id': random.randrange(10000, 99999)
},
'note': '',
'original': x
}
)
recipe_json['recipeIngredient'] = ingredients
except Exception:
recipe_json['recipeIngredient'] = ingredients
try:
recipe_json['recipeInstructions'] = parse_instructions(scrape.instructions())
except Exception:
recipe_json['recipeInstructions'] = ""
if scrape.url:
recipe_json['url'] = scrape.url
recipe_json['recipeInstructions'] += "\n\nImported from " + scrape.url
return recipe_json
def parse_name(name):
if type(name) == list:
try:
name = name[0]
except Exception:
name = 'ERROR'
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': 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': 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
return normalize_string(instructions)
def parse_image(image):
# check if list of images is returned, take first if so
if not image:
return None
if type(image) == list:
for pic in image:
if (type(pic) == str) and (pic[:4] == 'http'):
image = pic
elif 'url' in pic:
image = pic['url']
elif type(image) == dict:
if 'url' in image:
image = image['url']
# ignore relative image paths
if image[:4] != 'http':
image = ''
return image
def parse_servings(servings):
if type(servings) == str:
try:
servings = int(re.search(r'\d+', servings).group())
except AttributeError:
servings = 1
elif type(servings) == list:
try:
servings = int(re.findall(r'\b\d+\b', servings[0])[0])
except KeyError:
servings = 1
return servings
def parse_cooktime(cooktime):
if type(cooktime) not in [int, float]:
try:
cooktime = float(re.search(r'\d+', cooktime).group())
except (ValueError, AttributeError):
try:
cooktime = round(iso_parse_duration(cooktime).seconds / 60)
except ISO8601Error:
try:
if (type(cooktime) == list and len(cooktime) > 0):
cooktime = cooktime[0]
cooktime = round(parse_duration(cooktime).seconds / 60)
except AttributeError:
cooktime = 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
def parse_keywords(keyword_json, space):
keywords = []
# keywords as list
for kw in keyword_json:
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)})
else:
keywords.append({'id': random.randrange(1111111, 9999999, 1), 'text': kw})
return keywords
def listify_keywords(keyword_list):
# keywords as string
try:
if type(keyword_list[0]) == dict:
return keyword_list
except (KeyError, IndexError):
pass
if type(keyword_list) == str:
keyword_list = keyword_list.split(',')
# keywords as string in list
if (type(keyword_list) == list and len(keyword_list) == 1 and ',' in keyword_list[0]):
keyword_list = keyword_list[0].split(',')
return [x.strip() for x in keyword_list]
def normalize_string(string):
# Convert all named and numeric character references (e.g. &gt;, &#62;)
unescaped_string = unescape(string)
unescaped_string = re.sub('<[^<]+?>', '', unescaped_string)
unescaped_string = re.sub(' +', ' ', unescaped_string)
unescaped_string = re.sub('</p>', '\n', unescaped_string)
unescaped_string = re.sub(r'\n\s*\n', '\n\n', unescaped_string)
unescaped_string = unescaped_string.replace("\xa0", " ").replace("\t", " ").strip()
return unescaped_string

View File

@@ -0,0 +1,36 @@
from django.shortcuts import redirect
from django.urls import reverse
from django_scopes import scope, scopes_disabled
from cookbook.views import views
class ScopeMiddleware:
def __init__(self, get_response):
self.get_response = get_response
def __call__(self, request):
if request.user.is_authenticated:
if request.path.startswith('/admin/'):
with scopes_disabled():
return self.get_response(request)
if request.path.startswith('/signup/'):
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.user.groups.count() == 0 and not reverse('account_logout') in request.path:
return views.no_groups(request)
request.space = request.user.userpreference.space
# with scopes_disabled():
with scope(space=request.space):
return self.get_response(request)
else:
with scopes_disabled():
request.space = None
return self.get_response(request)

View File

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

View File

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

View File

@@ -0,0 +1,64 @@
import bleach
import markdown as md
from bleach_allowlist import markdown_attrs, markdown_tags
from cookbook.helper.mdx_attributes import MarkdownFormatExtension
from cookbook.helper.mdx_urlize import UrlizeExtension
from jinja2 import Template, TemplateSyntaxError, UndefinedError
from gettext import gettext as _
class IngredientObject(object):
amount = ""
unit = ""
food = ""
note = ""
def __init__(self, ingredient):
if ingredient.no_amount:
self.amount = ""
else:
self.amount = f"<scalable-number v-bind:number='{bleach.clean(str(ingredient.amount))}' v-bind:factor='ingredient_factor'></scalable-number>"
if ingredient.unit:
self.unit = bleach.clean(str(ingredient.unit))
else:
self.unit = ""
self.food = bleach.clean(str(ingredient.food))
self.note = bleach.clean(str(ingredient.note))
def __str__(self):
ingredient = self.amount
if self.unit != "":
ingredient += f' {self.unit}'
return f'{ingredient} {self.food}'
def render_instructions(step): # TODO deduplicate markdown cleanup code
instructions = step.instruction
tags = markdown_tags + [
'pre', 'table', 'td', 'tr', 'th', 'tbody', 'style', 'thead'
]
parsed_md = md.markdown(
instructions,
extensions=[
'markdown.extensions.fenced_code', 'tables',
UrlizeExtension(), MarkdownFormatExtension()
]
)
markdown_attrs['*'] = markdown_attrs['*'] + ['class']
instructions = bleach.clean(parsed_md, tags, markdown_attrs)
ingredients = []
for i in step.ingredients.all():
ingredients.append(IngredientObject(i))
try:
template = Template(instructions)
instructions = template.render(ingredients=ingredients)
except TemplateSyntaxError:
return _('Could not parse template code.') + ' Error: Template Syntax broken'
except UndefinedError:
return _('Could not parse template code.') + ' Error: Undefined Error'
return instructions

View File

@@ -0,0 +1,59 @@
import json
import re
from io import BytesIO
from zipfile import ZipFile
from cookbook.helper.ingredient_parser import parse, get_food, get_unit
from cookbook.integration.integration import Integration
from cookbook.models import Recipe, Step, Food, Unit, Ingredient, Keyword
class Pepperplate(Integration):
def get_recipe_from_file(self, file):
ingredient_mode = False
direction_mode = False
ingredients = []
directions = []
for fl in file.readlines():
line = fl.decode("utf-8")
if 'Title:' in line:
title = line.replace('Title:', '').replace('"', '').strip()
if 'Description:' in line:
description = line.replace('Description:', '').strip()
if 'Original URL:' in line or 'Source:' in line or 'Yield:' in line or 'Total:' in line:
if len(line.strip().split(':')[1]) > 0:
directions.append(line.strip() + '\n')
if ingredient_mode:
if len(line) > 2 and 'Instructions:' not in line:
ingredients.append(line.strip())
if direction_mode:
if len(line) > 2:
directions.append(line.strip() + '\n')
if 'Ingredients:' in line:
ingredient_mode = True
if 'Instructions:' in line:
ingredient_mode = False
direction_mode = True
recipe = Recipe.objects.create(name=title, description=description, created_by=self.request.user, internal=True, space=self.request.space)
step = Step.objects.create(
instruction='\n'.join(directions) + '\n\n'
)
for ingredient in ingredients:
if len(ingredient.strip()) > 0:
amount, unit, ingredient, note = parse(ingredient)
f = get_food(ingredient, self.request.space)
u = get_unit(unit, self.request.space)
step.ingredients.add(Ingredient.objects.create(
food=f, unit=u, amount=amount, note=note
))
recipe.steps.add(step)
return recipe
def get_file_from_recipe(self, recipe):
raise NotImplementedError('Method not implemented in storage integration')

View File

@@ -0,0 +1,60 @@
import re
from django.utils.translation import gettext as _
from cookbook.helper.ingredient_parser import parse, get_food, get_unit
from cookbook.integration.integration import Integration
from cookbook.models import Recipe, Step, Food, Unit, Ingredient
class ChefTap(Integration):
def import_file_name_filter(self, zip_info_object):
print("testing", zip_info_object.filename)
return re.match(r'^cheftap_export/([A-Za-z\d\w\s-])+.txt$', zip_info_object.filename) or re.match(r'^([A-Za-z\d\w\s-])+.txt$', zip_info_object.filename)
def get_recipe_from_file(self, file):
source_url = ''
ingredient_mode = 0
ingredients = []
directions = []
for i, fl in enumerate(file.readlines(), start=0):
line = fl.decode("utf-8")
if i == 0:
title = line.strip()
else:
if line.startswith('https:') or line.startswith('http:'):
source_url = line.strip()
else:
if ingredient_mode == 1 and len(line.strip()) == 0:
ingredient_mode = 2
if re.match(r'^([0-9])[^.](.)*$', line) and ingredient_mode < 2:
ingredient_mode = 1
ingredients.append(line.strip())
else:
directions.append(line.strip())
recipe = Recipe.objects.create(name=title, created_by=self.request.user, internal=True, space=self.request.space, )
step = Step.objects.create(instruction='\n'.join(directions))
if source_url != '':
step.instruction += '\n' + source_url
step.save()
for ingredient in ingredients:
if len(ingredient.strip()) > 0:
amount, unit, ingredient, note = parse(ingredient)
f = get_food(ingredient, self.request.space)
u = get_unit(unit, self.request.space)
step.ingredients.add(Ingredient.objects.create(
food=f, unit=u, amount=amount, note=note
))
recipe.steps.add(step)
return recipe
def get_file_from_recipe(self, recipe):
raise NotImplementedError('Method not implemented in storage integration')

View File

@@ -0,0 +1,79 @@
import json
import re
from io import BytesIO
from zipfile import ZipFile
from cookbook.helper.ingredient_parser import parse, get_food, get_unit
from cookbook.integration.integration import Integration
from cookbook.models import Recipe, Step, Food, Unit, Ingredient, Keyword
class Chowdown(Integration):
def import_file_name_filter(self, zip_info_object):
print("testing", zip_info_object.filename)
return re.match(r'^(_)*recipes/([A-Za-z\d\s-])+.md$', zip_info_object.filename)
def get_recipe_from_file(self, file):
ingredient_mode = False
direction_mode = False
description_mode = False
ingredients = []
directions = []
descriptions = []
for fl in file.readlines():
line = fl.decode("utf-8")
if 'title:' in line:
title = line.replace('title:', '').replace('"', '').strip()
if 'image:' in line:
image = line.replace('image:', '').strip()
if 'tags:' in line:
tags = line.replace('tags:', '').strip()
if ingredient_mode:
if len(line) > 2 and 'directions:' not in line:
ingredients.append(line[2:])
if '---' in line and direction_mode:
direction_mode = False
description_mode = True
if direction_mode:
if len(line) > 2:
directions.append(line[2:])
if 'ingredients:' in line:
ingredient_mode = True
if 'directions:' in line:
ingredient_mode = False
direction_mode = True
if description_mode and len(line) > 3 and '---' not in line:
descriptions.append(line)
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' + '\n'.join(descriptions)
)
for ingredient in ingredients:
amount, unit, ingredient, note = parse(ingredient)
f = get_food(ingredient, self.request.space)
u = get_unit(unit, self.request.space)
step.ingredients.add(Ingredient.objects.create(
food=f, unit=u, amount=amount, note=note
))
recipe.steps.add(step)
for f in self.files:
if '.zip' in f['name']:
import_zip = ZipFile(f['file'])
for z in import_zip.filelist:
if re.match(f'^images/{image}$', z.filename):
self.import_recipe_image(recipe, BytesIO(import_zip.read(z.filename)))
return recipe
def get_file_from_recipe(self, recipe):
raise NotImplementedError('Method not implemented in storage integration')

View File

@@ -0,0 +1,34 @@
import json
from io import BytesIO
from zipfile import ZipFile
from rest_framework.renderers import JSONRenderer
from cookbook.integration.integration import Integration
from cookbook.serializer import RecipeExportSerializer
class Default(Integration):
def get_recipe_from_file(self, file):
recipe_zip = ZipFile(file)
recipe_string = recipe_zip.read('recipe.json').decode("utf-8")
recipe = self.decode_recipe(recipe_string)
if 'image.png' in recipe_zip.namelist():
self.import_recipe_image(recipe, BytesIO(recipe_zip.read('image.png')))
return recipe
def decode_recipe(self, string):
data = json.loads(string)
serialized_recipe = RecipeExportSerializer(data=data, context={'request': self.request})
if serialized_recipe.is_valid():
recipe = serialized_recipe.save()
return recipe
return None
def get_file_from_recipe(self, recipe):
export = RecipeExportSerializer(recipe).data
return 'recipe.json', JSONRenderer().render(export).decode("utf-8")

View File

@@ -0,0 +1,56 @@
import base64
import json
from io import BytesIO
from cookbook.helper.ingredient_parser import parse, get_food, get_unit
from cookbook.integration.integration import Integration
from cookbook.models import Recipe, Step, Ingredient
class Domestica(Integration):
def get_recipe_from_file(self, file):
recipe = Recipe.objects.create(
name=file['name'].strip(),
created_by=self.request.user, internal=True,
space=self.request.space)
if file['servings'] != '':
recipe.servings = file['servings']
if file['timeCook'] != '':
recipe.waiting_time = file['timeCook']
if file['timePrep'] != '':
recipe.working_time = file['timePrep']
recipe.save()
step = Step.objects.create(
instruction=file['directions']
)
if file['source'] != '':
step.instruction += '\n' + file['source']
for ingredient in file['ingredients'].split('\n'):
if len(ingredient.strip()) > 0:
amount, unit, ingredient, note = parse(ingredient)
f = get_food(ingredient, self.request.space)
u = get_unit(unit, self.request.space)
step.ingredients.add(Ingredient.objects.create(
food=f, unit=u, amount=amount, note=note
))
recipe.steps.add(step)
if file['image'] != '':
self.import_recipe_image(recipe, BytesIO(base64.b64decode(file['image'].replace('data:image/jpeg;base64,', ''))))
return recipe
def get_file_from_recipe(self, recipe):
raise NotImplementedError('Method not implemented in storage integration')
def split_recipe_file(self, file):
return json.loads(file.read().decode("utf-8"))

View File

@@ -0,0 +1,207 @@
import datetime
import json
import uuid
from io import BytesIO, StringIO
from zipfile import ZipFile, BadZipFile
from django.core.files import File
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 cookbook.forms import ImportExportBase
from cookbook.models import Keyword, Recipe
class Integration:
request = None
keyword = None
files = None
export_type = None
ignored_recipes = []
def __init__(self, request, export_type):
"""
Integration for importing and exporting recipes
:param request: request context of import session (used to link user to created objects)
"""
self.request = request
self.export_type = export_type
self.keyword = Keyword.objects.create(
name=f'Import {export_type} {date_format(datetime.datetime.now(), "DATETIME_FORMAT")}.{datetime.datetime.now().strftime("%S")}',
description=f'Imported by {request.user.get_user_name()} at {date_format(datetime.datetime.now(), "DATETIME_FORMAT")}. Type: {export_type}',
icon='📥',
space=request.space
)
def do_export(self, recipes):
"""
Perform the export based on a list of recipes
:param recipes: list of recipe objects
:return: HttpResponse with a ZIP file that is directly downloaded
"""
# TODO this is temporary, find a better solution for different export formats when doing other exporters
if self.export_type != ImportExportBase.RECIPESAGE:
export_zip_stream = BytesIO()
export_zip_obj = ZipFile(export_zip_stream, 'w')
for r in recipes:
if r.internal and r.space == self.request.space:
recipe_zip_stream = BytesIO()
recipe_zip_obj = ZipFile(recipe_zip_stream, 'w')
recipe_stream = StringIO()
filename, data = self.get_file_from_recipe(r)
recipe_stream.write(data)
recipe_zip_obj.writestr(filename, recipe_stream.getvalue())
recipe_stream.close()
try:
recipe_zip_obj.writestr('image.png', r.image.file.read())
except ValueError:
pass
recipe_zip_obj.close()
export_zip_obj.writestr(str(r.pk) + '.zip', recipe_zip_stream.getvalue())
export_zip_obj.close()
response = HttpResponse(export_zip_stream.getvalue(), content_type='application/force-download')
response['Content-Disposition'] = 'attachment; filename="export.zip"'
return response
else:
json_list = []
for r in recipes:
json_list.append(self.get_file_from_recipe(r))
response = HttpResponse(json.dumps(json_list), content_type='application/force-download')
response['Content-Disposition'] = 'attachment; filename="recipes.json"'
return response
def import_file_name_filter(self, zip_info_object):
"""
Since zipfile.namelist() returns all files in all subdirectories this function allows filtering of files
If false is returned the file will be ignored
By default all files are included
:param zip_info_object: ZipInfo object
:return: Boolean if object should be included
"""
return True
def do_import(self, files, il, import_duplicates):
"""
Imports given files
:param import_duplicates: if true duplicates are imported as well
:param files: List of in memory files
:param il: Import Log object to refresh while running
:return: HttpResponseRedirect to the recipe search showing all imported recipes
"""
with scope(space=self.request.space):
self.keyword.name = _('Import') + ' ' + str(il.pk)
self.keyword.save()
try:
self.files = files
for f in files:
if '.zip' in f['name'] or '.paprikarecipes' in f['name']:
import_zip = ZipFile(f['file'])
for z in import_zip.filelist:
if self.import_file_name_filter(z):
try:
recipe = self.get_recipe_from_file(BytesIO(import_zip.read(z.filename)))
recipe.keywords.add(self.keyword)
il.msg += f'{recipe.pk} - {recipe.name} \n'
self.handle_duplicates(recipe, import_duplicates)
except Exception as e:
il.msg += f'-------------------- \n ERROR \n{e}\n--------------------\n'
import_zip.close()
elif '.json' in f['name'] or '.txt' in f['name']:
data_list = self.split_recipe_file(f['file'])
for d in data_list:
try:
recipe = self.get_recipe_from_file(d)
recipe.keywords.add(self.keyword)
il.msg += f'{recipe.pk} - {recipe.name} \n'
self.handle_duplicates(recipe, import_duplicates)
except Exception as e:
il.msg += f'-------------------- \n ERROR \n{e}\n--------------------\n'
elif '.rtk' in f['name']:
import_zip = ZipFile(f['file'])
for z in import_zip.filelist:
if self.import_file_name_filter(z):
data_list = self.split_recipe_file(import_zip.read(z.filename).decode('utf-8'))
for d in data_list:
try:
recipe = self.get_recipe_from_file(d)
recipe.keywords.add(self.keyword)
il.msg += f'{recipe.pk} - {recipe.name} \n'
self.handle_duplicates(recipe, import_duplicates)
except Exception as e:
il.msg += f'-------------------- \n ERROR \n{e}\n--------------------\n'
import_zip.close()
else:
recipe = self.get_recipe_from_file(f['file'])
recipe.keywords.add(self.keyword)
il.msg += f'{recipe.pk} - {recipe.name} \n'
self.handle_duplicates(recipe, import_duplicates)
except BadZipFile:
il.msg += 'ERROR ' + _(
'Importer expected a .zip file. Did you choose the correct importer type for your data ?') + '\n'
if len(self.ignored_recipes) > 0:
il.msg += '\n' + _(
'The following recipes were ignored because they already existed:') + ' ' + ', '.join(
self.ignored_recipes) + '\n\n'
il.keyword = self.keyword
il.msg += (_('Imported %s recipes.') % Recipe.objects.filter(keywords=self.keyword).count()) + '\n'
il.running = False
il.save()
def handle_duplicates(self, recipe, import_duplicates):
"""
Checks if a recipe is already present, if so deletes it
:param recipe: Recipe object
:param import_duplicates: if duplicates should be imported
"""
if Recipe.objects.filter(space=self.request.space, name=recipe.name).count() > 1 and not import_duplicates:
recipe.delete()
self.ignored_recipes.append(recipe.name)
@staticmethod
def import_recipe_image(recipe, image_file):
"""
Adds an image to a recipe naming it correctly
:param recipe: Recipe object
:param image_file: ByteIO stream containing the image
"""
recipe.image = File(image_file, name=f'{uuid.uuid4()}_{recipe.pk}.png')
recipe.save()
def get_recipe_from_file(self, file):
"""
Takes any file like object and converts it into a recipe
:param file: ByteIO or any file like object, depends on provider
:return: Recipe object
"""
raise NotImplementedError('Method not implemented in integration')
def split_recipe_file(self, file):
"""
Takes a file that contains multiple recipes and splits it into a list of strings of various formats (e.g. json, text, ..)
:param file: ByteIO or any file like object, depends on provider
:return: list of strings
"""
raise NotImplementedError('Method not implemented in integration')
def get_file_from_recipe(self, recipe):
"""
Takes a recipe object and converts it to a string (depending on the format)
returns both the filename of the exported file and the file contents
:param recipe: Recipe object that should be converted
:returns:
- name - file name in export
- data - string content for file to get created in export zip
"""
raise NotImplementedError('Method not implemented in integration')

View File

@@ -0,0 +1,52 @@
import json
import re
from io import BytesIO
from zipfile import ZipFile
from cookbook.helper.ingredient_parser import parse, get_food, get_unit
from cookbook.integration.integration import Integration
from cookbook.models import Recipe, Step, Food, Unit, Ingredient
class Mealie(Integration):
def import_file_name_filter(self, zip_info_object):
return re.match(r'^recipes/([A-Za-z\d-])+.json$', zip_info_object.filename)
def get_recipe_from_file(self, file):
recipe_json = json.loads(file.getvalue().decode("utf-8"))
recipe = Recipe.objects.create(
name=recipe_json['name'].strip(), description=recipe_json['description'].strip(),
created_by=self.request.user, internal=True, space=self.request.space)
# TODO parse times (given in PT2H3M )
ingredients_added = False
for s in recipe_json['recipeInstructions']:
step = Step.objects.create(
instruction=s['text']
)
if not ingredients_added:
ingredients_added = True
for ingredient in recipe_json['recipeIngredient']:
amount, unit, ingredient, note = parse(ingredient)
f = get_food(ingredient, self.request.space)
u = get_unit(unit, self.request.space)
step.ingredients.add(Ingredient.objects.create(
food=f, unit=u, amount=amount, note=note
))
recipe.steps.add(step)
for f in self.files:
if '.zip' in f['name']:
import_zip = ZipFile(f['file'])
for z in import_zip.filelist:
if re.match(f'^images/{recipe_json["slug"]}.jpg$', z.filename):
self.import_recipe_image(recipe, BytesIO(import_zip.read(z.filename)))
return recipe
def get_file_from_recipe(self, recipe):
raise NotImplementedError('Method not implemented in storage integration')

View File

@@ -0,0 +1,83 @@
import json
import re
from io import BytesIO
from zipfile import ZipFile
from cookbook.helper.ingredient_parser import parse, get_food, get_unit
from cookbook.integration.integration import Integration
from cookbook.models import Recipe, Step, Food, Unit, Ingredient, Keyword
class MealMaster(Integration):
def get_recipe_from_file(self, file):
print('------------ getting recipe')
servings = 1
ingredients = []
directions = []
for line in file.replace('\r', '').split('\n'):
print('testing line')
if not line.startswith('MMMMM') and line.strip != '':
if 'Title:' in line:
title = line.replace('Title:', '').strip()
else:
if 'Categories:' in line:
tags = line.replace('Categories:', '').strip()
else:
if 'Yield:' in line:
servings_text = line.replace('Yield:', '').strip()
else:
if re.match('\s{2,}([0-9])+', line):
ingredients.append(line.strip())
else:
directions.append(line.strip())
try:
servings = re.findall('([0-9])+', servings_text)[0]
except Exception as e:
print('failed parsing servings ', e)
recipe = Recipe.objects.create(name=title, servings=servings, 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'
)
for ingredient in ingredients:
if len(ingredient.strip()) > 0:
amount, unit, ingredient, note = parse(ingredient)
f = get_food(ingredient, self.request.space)
u = get_unit(unit, self.request.space)
step.ingredients.add(Ingredient.objects.create(
food=f, unit=u, amount=amount, note=note
))
recipe.steps.add(step)
return recipe
def get_file_from_recipe(self, recipe):
raise NotImplementedError('Method not implemented in storage integration')
def split_recipe_file(self, file):
recipe_list = []
current_recipe = ''
for fl in file.readlines():
line = fl.decode("ANSI")
if (line.startswith('MMMMM') or line.startswith('-----')) and 'meal-master' in line.lower():
if current_recipe != '':
recipe_list.append(current_recipe)
current_recipe = ''
else:
current_recipe = ''
else:
current_recipe += line + '\n'
if current_recipe != '':
recipe_list.append(current_recipe)
return recipe_list

View File

@@ -0,0 +1,54 @@
import json
import re
from io import BytesIO
from zipfile import ZipFile
from cookbook.helper.ingredient_parser import parse, get_food, get_unit
from cookbook.integration.integration import Integration
from cookbook.models import Recipe, Step, Food, Unit, Ingredient
class NextcloudCookbook(Integration):
def import_file_name_filter(self, zip_info_object):
return zip_info_object.filename.endswith('.json')
def get_recipe_from_file(self, file):
recipe_json = json.loads(file.getvalue().decode("utf-8"))
recipe = Recipe.objects.create(
name=recipe_json['name'].strip(), description=recipe_json['description'].strip(),
created_by=self.request.user, internal=True,
servings=recipe_json['recipeYield'], space=self.request.space)
# TODO parse times (given in PT2H3M )
# TODO parse keywords
ingredients_added = False
for s in recipe_json['recipeInstructions']:
step = Step.objects.create(
instruction=s
)
if not ingredients_added:
ingredients_added = True
for ingredient in recipe_json['recipeIngredient']:
amount, unit, ingredient, note = parse(ingredient)
f = get_food(ingredient, self.request.space)
u = get_unit(unit, self.request.space)
step.ingredients.add(Ingredient.objects.create(
food=f, unit=u, amount=amount, note=note
))
recipe.steps.add(step)
for f in self.files:
if '.zip' in f['name']:
import_zip = ZipFile(f['file'])
for z in import_zip.filelist:
if re.match(f'^Recipes/{recipe.name}/full.jpg$', z.filename):
self.import_recipe_image(recipe, BytesIO(import_zip.read(z.filename)))
return recipe
def get_file_from_recipe(self, recipe):
raise NotImplementedError('Method not implemented in storage integration')

View File

@@ -0,0 +1,83 @@
import base64
import gzip
import json
import re
from io import BytesIO
from cookbook.helper.ingredient_parser import parse, get_food, get_unit
from cookbook.integration.integration import Integration
from cookbook.models import Recipe, Step, Ingredient, Keyword
from gettext import gettext as _
class Paprika(Integration):
def get_file_from_recipe(self, recipe):
raise NotImplementedError('Method not implemented in storage integration')
def get_recipe_from_file(self, file):
with gzip.open(file, 'r') as recipe_zip:
recipe_json = json.loads(recipe_zip.read().decode("utf-8"))
recipe = Recipe.objects.create(
name=recipe_json['name'].strip(), created_by=self.request.user, internal=True, space=self.request.space)
if 'description' in recipe_json:
recipe.description = 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 len(recipe_json['cook_time'].strip()) > 0:
recipe.waiting_time = re.findall(r'\d+', recipe_json['cook_time'])[0]
if len(recipe_json['prep_time'].strip()) > 0:
recipe.working_time = re.findall(r'\d+', recipe_json['prep_time'])[0]
except Exception:
pass
recipe.save()
instructions = recipe_json['directions']
if recipe_json['notes'] and len(recipe_json['notes'].strip()) > 0:
instructions += '\n\n### ' + _('Notes') + ' \n' + recipe_json['notes']
if recipe_json['nutritional_info'] and len(recipe_json['nutritional_info'].strip()) > 0:
instructions += '\n\n### ' + _('Nutritional Information') + ' \n' + recipe_json['nutritional_info']
try:
if len(recipe_json['source'].strip()) > 0 or len(recipe_json['source_url'].strip()) > 0:
instructions += '\n\n### ' + _('Source') + ' \n' + recipe_json['source'].strip() + ' \n' + recipe_json['source_url'].strip()
except AttributeError:
pass
step = Step.objects.create(
instruction=instructions
)
if 'categories' in recipe_json:
for c in recipe_json['categories']:
keyword, created = Keyword.objects.get_or_create(name=c.strip(), space=self.request.space)
recipe.keywords.add(keyword)
try:
for ingredient in recipe_json['ingredients'].split('\n'):
if len(ingredient.strip()) > 0:
amount, unit, ingredient, note = parse(ingredient)
f = get_food(ingredient, self.request.space)
u = get_unit(unit, self.request.space)
step.ingredients.add(Ingredient.objects.create(
food=f, unit=u, amount=amount, note=note
))
except AttributeError:
pass
recipe.steps.add(step)
if recipe_json.get("photo_data", None):
self.import_recipe_image(recipe, BytesIO(base64.b64decode(recipe_json['photo_data'])))
return recipe

View File

@@ -0,0 +1,135 @@
import re
import json
import base64
import requests
from io import BytesIO
from zipfile import ZipFile
import imghdr
from django.utils.translation import gettext as _
from cookbook.helper.ingredient_parser import parse, get_food, get_unit
from cookbook.integration.integration import Integration
from cookbook.models import Recipe, Step, Food, Unit, Ingredient, Keyword
class RecetteTek(Integration):
def import_file_name_filter(self, zip_info_object):
print("testing", zip_info_object.filename)
return re.match(r'^recipes_0.json$', zip_info_object.filename) or re.match(r'^recipes.json$', zip_info_object.filename)
def split_recipe_file(self, file):
recipe_json = json.loads(file)
recipe_list = [r for r in recipe_json]
return recipe_list
def get_recipe_from_file(self, file):
# Create initial recipe with just a title and a decription
recipe = Recipe.objects.create(name=file['title'], created_by=self.request.user, internal=True, space=self.request.space, )
# set the description as an empty string for later use for the source URL, incase there is no description text.
recipe.description = ''
try:
if file['description'] != '':
recipe.description = file['description'].strip()
except Exception as e:
print(recipe.name, ': failed to parse recipe description ', str(e))
instructions = file['instructions']
if not instructions:
instructions = ''
step = Step.objects.create(instruction=instructions)
# Append the original import url to the step (if it exists)
try:
if file['url'] != '':
step.instruction += '\n\nImported from: ' + file['url']
step.save()
except Exception as e:
print(recipe.name, ': failed to import source url ', str(e))
try:
# Process the ingredients. Assumes 1 ingredient per line.
for ingredient in file['ingredients'].split('\n'):
if len(ingredient.strip()) > 0:
amount, unit, ingredient, note = parse(ingredient)
f = get_food(ingredient, self.request.space)
u = get_unit(unit, self.request.space)
step.ingredients.add(Ingredient.objects.create(
food=f, unit=u, amount=amount, note=note
))
except Exception as e:
print(recipe.name, ': failed to parse recipe ingredients ', str(e))
recipe.steps.add(step)
# Attempt to import prep/cooking times
# quick hack, this assumes only one number in the quantity field.
try:
if file['quantity'] != '':
for item in file['quantity'].split(' '):
if item.isdigit():
recipe.servings = int(item)
break
except Exception as e:
print(recipe.name, ': failed to parse quantity ', str(e))
try:
if file['totalTime'] != '':
recipe.waiting_time = int(file['totalTime'])
except Exception as e:
print(recipe.name, ': failed to parse total times ', str(e))
try:
if file['preparationTime'] != '':
recipe.working_time = int(file['preparationTime'])
except Exception as e:
print(recipe.name, ': failed to parse prep time ', str(e))
try:
if file['cookingTime'] != '':
recipe.waiting_time = int(file['cookingTime'])
except Exception as e:
print(recipe.name, ': failed to parse cooking time ', str(e))
recipe.save()
# Import the recipe keywords
try:
if file['keywords'] != '':
for keyword in file['keywords'].split(';'):
k, created = Keyword.objects.get_or_create(name=keyword.strip(), space=self.request.space)
recipe.keywords.add(k)
recipe.save()
except Exception as e:
pass
# TODO: Parse Nutritional Information
# Import the original image from the zip file, if we cannot do that, attempt to download it again.
try:
if file['pictures'][0] !='':
image_file_name = file['pictures'][0].split('/')[-1]
for f in self.files:
if '.rtk' in f['name']:
import_zip = ZipFile(f['file'])
self.import_recipe_image(recipe, BytesIO(import_zip.read(image_file_name)))
else:
if file['originalPicture'] != '':
response=requests.get(file['originalPicture'])
if imghdr.what(BytesIO(response.content)) != None:
self.import_recipe_image(recipe, BytesIO(response.content))
else:
raise Exception("Original image failed to download.")
except Exception as e:
print(recipe.name, ': failed to import image ', str(e))
return recipe
def get_file_from_recipe(self, recipe):
raise NotImplementedError('Method not implemented in storage integration')

View File

@@ -0,0 +1,93 @@
import base64
import json
from io import BytesIO
import requests
from rest_framework.renderers import JSONRenderer
from cookbook.helper.ingredient_parser import parse, get_food, get_unit
from cookbook.integration.integration import Integration
from cookbook.models import Recipe, Step, Ingredient
class RecipeSage(Integration):
def get_recipe_from_file(self, file):
recipe = Recipe.objects.create(
name=file['name'].strip(),
created_by=self.request.user, internal=True,
space=self.request.space)
try:
if file['recipeYield'] != '':
recipe.servings = int(file['recipeYield'])
if file['totalTime'] != '':
recipe.waiting_time = int(file['totalTime']) - int(file['timePrep'])
if file['prepTime'] != '':
recipe.working_time = int(file['timePrep'])
recipe.save()
except Exception as e:
print('failed to parse yield or time ', str(e))
ingredients_added = False
for s in file['recipeInstructions']:
step = Step.objects.create(
instruction=s['text']
)
if not ingredients_added:
ingredients_added = True
for ingredient in file['recipeIngredient']:
amount, unit, ingredient, note = parse(ingredient)
f = get_food(ingredient, self.request.space)
u = get_unit(unit, self.request.space)
step.ingredients.add(Ingredient.objects.create(
food=f, unit=u, amount=amount, note=note
))
recipe.steps.add(step)
if len(file['image']) > 0:
try:
response = requests.get(file['image'][0])
self.import_recipe_image(recipe, BytesIO(response.content))
except Exception as e:
print('failed to import image ', str(e))
return recipe
def get_file_from_recipe(self, recipe):
data = {
'@context': 'http://schema.org',
'@type': 'Recipe',
'creditText': '',
'isBasedOn': '',
'name': recipe.name,
'description': recipe.description,
'prepTime': str(recipe.working_time),
'totalTime': str(recipe.waiting_time + recipe.working_time),
'recipeYield': str(recipe.servings),
'image': [],
'recipeCategory': [],
'comment': [],
'recipeIngredient': [],
'recipeInstructions': [],
}
for s in recipe.steps.all():
if s.type != Step.TIME:
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}')
return data
def split_recipe_file(self, file):
return json.loads(file.read().decode("utf-8"))

View File

@@ -0,0 +1,82 @@
import json
import re
from io import BytesIO
from zipfile import ZipFile
from cookbook.helper.ingredient_parser import parse, get_food, get_unit
from cookbook.integration.integration import Integration
from cookbook.models import Recipe, Step, Food, Unit, Ingredient, Keyword
class RezKonv(Integration):
def get_recipe_from_file(self, file):
ingredient_mode = False
direction_mode = False
ingredients = []
directions = []
for line in file.replace('\r', '').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()):
ingredient_mode = False
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:
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)
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'
)
for ingredient in ingredients:
if len(ingredient.strip()) > 0:
amount, unit, ingredient, note = parse(ingredient)
f = get_food(ingredient, self.request.space)
u = get_unit(unit, self.request.space)
step.ingredients.add(Ingredient.objects.create(
food=f, unit=u, amount=amount, note=note
))
recipe.steps.add(step)
return recipe
def get_file_from_recipe(self, recipe):
raise NotImplementedError('Method not implemented in storage integration')
def split_recipe_file(self, file):
recipe_list = []
current_recipe = ''
for fl in file.readlines():
line = fl.decode("ANSI")
if line.startswith('=====') and 'rezkonv' in line.lower():
if current_recipe != '':
recipe_list.append(current_recipe)
current_recipe = ''
else:
current_recipe = ''
else:
current_recipe += line + '\n'
if current_recipe != '':
recipe_list.append(current_recipe)
return recipe_list

View File

@@ -0,0 +1,60 @@
from django.utils.translation import gettext as _
from cookbook.helper.ingredient_parser import parse, get_food, get_unit
from cookbook.integration.integration import Integration
from cookbook.models import Recipe, Step, Food, Unit, Ingredient
class Safron(Integration):
def get_recipe_from_file(self, file):
ingredient_mode = False
direction_mode = False
ingredients = []
directions = []
for fl in file.readlines():
line = fl.decode("utf-8")
if 'Title:' in line:
title = line.replace('Title:', '').strip()
if 'Description:' in line:
description = line.replace('Description:', '').strip()
if 'Yield:' in line:
directions.append(_('Servings') + ' ' + line.replace('Yield:', '').strip() + '\n')
if 'Cook:' in line:
directions.append(_('Waiting time') + ' ' + line.replace('Cook:', '').strip() + '\n')
if 'Prep:' in line:
directions.append(_('Preparation Time') + ' ' + line.replace('Prep:', '').strip() + '\n')
if 'Cookbook:' in line:
directions.append(_('Cookbook') + ' ' + line.replace('Cookbook:', '').strip() + '\n')
if 'Section:' in line:
directions.append(_('Section') + ' ' + line.replace('Section:', '').strip() + '\n')
if ingredient_mode:
if len(line) > 2 and 'Instructions:' not in line:
ingredients.append(line.strip())
if direction_mode:
if len(line) > 2:
directions.append(line.strip())
if 'Ingredients:' in line:
ingredient_mode = True
if 'Instructions:' in line:
ingredient_mode = False
direction_mode = True
recipe = Recipe.objects.create(name=title, description=description, created_by=self.request.user, internal=True, space=self.request.space, )
step = Step.objects.create(instruction='\n'.join(directions))
for ingredient in ingredients:
amount, unit, ingredient, note = parse(ingredient)
f = get_food(ingredient, self.request.space)
u = get_unit(unit, self.request.space)
step.ingredients.add(Ingredient.objects.create(
food=f, unit=u, amount=amount, note=note
))
recipe.steps.add(step)
return recipe
def get_file_from_recipe(self, recipe):
raise NotImplementedError('Method not implemented in storage integration')

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

File diff suppressed because it is too large Load Diff

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

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

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

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

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

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

View File

@@ -1,20 +1,22 @@
# Generated by Django 3.0.2 on 2020-01-30 09:59
from django.db import migrations
from django_scopes import scopes_disabled
def migrate_ingredient_units(apps, schema_editor):
Unit = apps.get_model('cookbook', 'Unit')
RecipeIngredients = apps.get_model('cookbook', 'RecipeIngredients')
with scopes_disabled():
Unit = apps.get_model('cookbook', 'Unit')
RecipeIngredients = apps.get_model('cookbook', 'RecipeIngredients')
for u in RecipeIngredients.objects.values('unit').distinct():
unit = Unit()
unit.name = u['unit']
unit.save()
for u in RecipeIngredients.objects.values('unit').distinct():
unit = Unit()
unit.name = u['unit']
unit.save()
for i in RecipeIngredients.objects.all():
i.unit_key = Unit.objects.get(name=i.unit)
i.save()
for i in RecipeIngredients.objects.all():
i.unit_key = Unit.objects.get(name=i.unit)
i.save()
class Migration(migrations.Migration):

View File

@@ -1,19 +1,21 @@
# Generated by Django 3.0.2 on 2020-02-16 22:09
from django.db import migrations
from django_scopes import scopes_disabled
def migrate_ingredients(apps, schema_editor):
Ingredient = apps.get_model('cookbook', 'Ingredient')
RecipeIngredient = apps.get_model('cookbook', 'RecipeIngredient')
with scopes_disabled():
Ingredient = apps.get_model('cookbook', 'Ingredient')
RecipeIngredient = apps.get_model('cookbook', 'RecipeIngredient')
for u in RecipeIngredient.objects.values('name').distinct():
ingredient = Ingredient()
ingredient.name = u['name']
ingredient.save()
for u in RecipeIngredient.objects.values('name').distinct():
ingredient = Ingredient()
ingredient.name = u['name']
ingredient.save()
for i in RecipeIngredient.objects.all():
i.ingredient = Ingredient.objects.get(name=i.name)
i.save()
for i in RecipeIngredient.objects.all():
i.ingredient = Ingredient.objects.get(name=i.name)
i.save()
class Migration(migrations.Migration):

View File

@@ -1,15 +1,17 @@
# Generated by Django 3.0.5 on 2020-04-26 14:14
from django.db import migrations
from django_scopes import scopes_disabled
def apply_migration(apps, schema_editor):
Group = apps.get_model('auth', 'Group')
Group.objects.bulk_create([
Group(name=u'guest'),
Group(name=u'user'),
Group(name=u'admin'),
])
with scopes_disabled():
Group = apps.get_model('auth', 'Group')
Group.objects.bulk_create([
Group(name=u'guest'),
Group(name=u'user'),
Group(name=u'admin'),
])
class Migration(migrations.Migration):

View File

@@ -1,15 +1,17 @@
# Generated by Django 3.0.5 on 2020-04-27 16:00
from django.db import migrations
from django_scopes import scopes_disabled
def apply_migration(apps, schema_editor):
Group = apps.get_model('auth', 'Group')
User = apps.get_model('auth', 'User')
for u in User.objects.all():
if u.groups.count() < 1:
u.groups.add(Group.objects.get(name='admin'))
u.save()
with scopes_disabled():
Group = apps.get_model('auth', 'Group')
User = apps.get_model('auth', 'User')
for u in User.objects.all():
if u.groups.count() < 1:
u.groups.add(Group.objects.get(name='admin'))
u.save()
class Migration(migrations.Migration):

View File

@@ -0,0 +1,27 @@
# Generated by Django 3.0.5 on 2020-06-02 09:33
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('cookbook', '0045_userpreference_show_recent'),
]
operations = [
migrations.CreateModel(
name='MealType',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=128)),
('order', models.IntegerField(default=0)),
],
),
migrations.AddField(
model_name='mealplan',
name='meal_type',
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='cookbook.MealType'),
),
]

View File

@@ -0,0 +1,53 @@
# Generated by Django 3.0.5 on 2020-06-02 09:33
from django.db import migrations
from django.utils.translation import gettext as _
from django_scopes import scopes_disabled
def migrate_meal_types(apps, schema_editor):
with scopes_disabled():
MealPlan = apps.get_model('cookbook', 'MealPlan')
MealType = apps.get_model('cookbook', 'MealType')
breakfast = MealType.objects.create(
name=_('Breakfast'),
order=0,
)
lunch = MealType.objects.create(
name=_('Lunch'),
order=0,
)
dinner = MealType.objects.create(
name=_('Dinner'),
order=0,
)
other = MealType.objects.create(
name=_('Other'),
order=0,
)
for m in MealPlan.objects.all():
if m.meal == 'BREAKFAST':
m.meal_type = breakfast
if m.meal == 'LUNCH':
m.meal_type = lunch
if m.meal == 'DINNER':
m.meal_type = dinner
if m.meal == 'OTHER':
m.meal_type = other
m.save()
class Migration(migrations.Migration):
dependencies = [
('cookbook', '0046_auto_20200602_1133'),
]
operations = [
migrations.RunPython(migrate_meal_types),
]

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