Squashed commit of the following:
commit81a8734fac
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 commitabcef54e72
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 commite15c92cda5
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 commit45dba6fad2
Author: smilerz <smilerz@gmail.com> Date: Fri Mar 19 13:23:55 2021 -0500 fix json direct import when wrapped in @graph commitf67bb3cb98
Author: Sebastian Markgraf <Sebastian-Markgraf@t-online.de> Date: Fri Mar 19 15:49:12 2021 +0100 Add generated icons from icongenerator. commit53b584da56
Author: Sebastian Markgraf <Sebastian-Markgraf@t-online.de> Date: Fri Mar 19 12:48:58 2021 +0100 Fix errors in favicon SVG. commit7527646319
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>
This commit is contained in:
parent
4aaecb4ada
commit
0a38049ce4
@ -13,8 +13,8 @@
|
||||
|
||||
<link rel="shortcut icon" type="image/x-icon" href="{% static 'assets/favicon.svg' %}">
|
||||
<link rel="shortcut icon" href="{% static 'assets/favicon.svg' %}">
|
||||
<link rel="icon" type="image/png" href="{% static 'assets/favicon-32x32.png' %}" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="{% static 'assets/favicon-16x16.png' %}" sizes="16x16">
|
||||
<link rel="icon" type="image/png" href="{% static 'assets/.svg' %}" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="{% static 'assets/favicon-16x16.png' %}" sizes="16x16" >
|
||||
|
||||
<link rel="mask-icon" href="{% static 'assets/safari-pinned-tab.svg' %}" color="#161616">
|
||||
<link rel="apple-touch-icon" href="{% static 'assets/apple-touch-icon.png' %}" sizes="180x180">
|
||||
@ -24,9 +24,10 @@
|
||||
<meta name="msapplication-TileImage" content="/mstile-144x144.png">
|
||||
|
||||
|
||||
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#161616">
|
||||
<meta name="msapplication-TileColor" content="#161616">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#161616">
|
||||
<meta name="msapplication-TileColor" content="#161616">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
|
||||
|
||||
|
||||
<!-- Bootstrap 4 -->
|
||||
|
@ -708,43 +708,6 @@ def recipe_from_source(request):
|
||||
)
|
||||
|
||||
|
||||
@group_required('user')
|
||||
def recipe_from_source(request, url=None, url_text=None):
|
||||
if url_text:
|
||||
json_data = url_text
|
||||
else:
|
||||
json_data = request.POST['data']
|
||||
if 'auto' in request.POST:
|
||||
auto = request.POST['auto']
|
||||
else:
|
||||
auto = 'true'
|
||||
|
||||
recipe_json, recipe_tree, recipe_html, images = get_recipe_from_source(json_data, url, request.space)
|
||||
if len(recipe_tree) == 0 and len(recipe_json) == 0:
|
||||
return JsonResponse(
|
||||
{
|
||||
'error': True,
|
||||
'msg': _('No useable data could be found.') # noqa: E501
|
||||
},
|
||||
status=400
|
||||
)
|
||||
else:
|
||||
if auto == "true":
|
||||
return JsonResponse({'recipe_json': recipe_json})
|
||||
else:
|
||||
# overide keyword structure from dict to list
|
||||
kws = []
|
||||
for kw in recipe_json['keywords']:
|
||||
kws.append(kw['text'])
|
||||
recipe_json['keywords'] = kws
|
||||
return JsonResponse({
|
||||
'recipe_tree': recipe_tree,
|
||||
'recipe_json': recipe_json,
|
||||
'recipe_html': recipe_html,
|
||||
'images': images,
|
||||
})
|
||||
|
||||
|
||||
@group_required('admin')
|
||||
def get_backup(request):
|
||||
if not request.user.is_superuser:
|
||||
|
@ -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==13.1.1
|
||||
recipe-scrapers==12.2.1
|
||||
django-scopes==1.2.0
|
||||
pytest==6.2.3
|
||||
pytest-django==4.2.0
|
||||
|
Loading…
Reference in New Issue
Block a user