From 4d5a9e446f11850cc81ac5f098c46a393a6eb381 Mon Sep 17 00:00:00 2001 From: smilerz Date: Tue, 23 Mar 2021 14:14:56 -0500 Subject: [PATCH] Squashed commit of the following: commit 81a8734facbb5f9f0d761ae268f50bb20df92ee8 Merge: abcef54 f67bb3c Author: vabene1111 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 abcef54e72c38432c45a4ed793ceb5e4f71b46a6 Merge: e15c92c 7527646 Author: vabene1111 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 e15c92cda59b8640e33202854fefd5fe5eab5a13 Merge: 58fc269 45dba6f Author: vabene1111 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 45dba6fad22e0062d24e1b9b4237b960d2da432b Author: smilerz Date: Fri Mar 19 13:23:55 2021 -0500 fix json direct import when wrapped in @graph commit f67bb3cb989cf65702fd3df4397ce9d4bddd3966 Author: Sebastian Markgraf Date: Fri Mar 19 15:49:12 2021 +0100 Add generated icons from icongenerator. commit 53b584da56fe0c9ccd9d7244031e1c72d9ffd333 Author: Sebastian Markgraf Date: Fri Mar 19 12:48:58 2021 +0100 Fix errors in favicon SVG. commit 7527646319cff6c4b1a04bbd4bd5041aab6ef43e 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] --- cookbook/templates/base.html | 11 ++++++----- cookbook/views/api.py | 25 ------------------------- requirements.txt | 2 +- 3 files changed, 7 insertions(+), 31 deletions(-) diff --git a/cookbook/templates/base.html b/cookbook/templates/base.html index b0b49cfb..87666383 100644 --- a/cookbook/templates/base.html +++ b/cookbook/templates/base.html @@ -13,8 +13,8 @@ - - + + @@ -24,9 +24,10 @@ - - - + + + + diff --git a/cookbook/views/api.py b/cookbook/views/api.py index 8790dad6..a1d1f390 100644 --- a/cookbook/views/api.py +++ b/cookbook/views/api.py @@ -534,31 +534,6 @@ def get_plan_ical(request, from_date, to_date): return response -@group_required('user') -def recipe_from_json(request): - mjson = request.POST['json'] - - md_json = json.loads(mjson) - for ld_json_item in md_json: - # recipes type might be wrapped in @graph type - if '@graph' in ld_json_item: - for x in md_json['@graph']: - if '@type' in x and x['@type'] == 'Recipe': - md_json = x - - if ('@type' in md_json - and md_json['@type'] == 'Recipe'): - return JsonResponse(find_recipe_json(md_json, '', request.space)) - - return JsonResponse( - { - 'error': True, - 'msg': _('Could not parse correctly...') - }, - status=400 - ) - - @group_required('user') def recipe_from_url(request): url = request.POST['url'] diff --git a/requirements.txt b/requirements.txt index 5bd24680..93bea96f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -31,7 +31,7 @@ Jinja2==2.11.3 django-webpack-loader==0.7.0 django-js-reverse==0.9.1 django-allauth==0.44.0 -recipe-scrapers==12.2.2 +recipe-scrapers==12.2.1 django-scopes==1.2.0 pytest==6.2.3 pytest-django==4.2.0