mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-01 04:10:06 -05:00
redirect to import url for processing
This commit is contained in:
@@ -621,6 +621,8 @@ def recipe_from_source(request, url=None, url_text=None):
|
||||
auto = request.POST['auto']
|
||||
else:
|
||||
auto = 'true'
|
||||
if 'url' in request.POST:
|
||||
url = request.POST['url']
|
||||
|
||||
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:
|
||||
|
||||
@@ -183,8 +183,13 @@ def import_url(request):
|
||||
pass
|
||||
|
||||
return HttpResponse(reverse('view_recipe', args=[recipe.pk]))
|
||||
|
||||
if 'id' in request.GET:
|
||||
context = {'bookmarklet': 25}
|
||||
else:
|
||||
context = {}
|
||||
|
||||
return render(request, 'url_import.html', {})
|
||||
return render(request, 'url_import.html', context)
|
||||
|
||||
|
||||
class Object(object):
|
||||
|
||||
Reference in New Issue
Block a user