From 9dd8a74a5eff8eca33c97210225cfe6fcfefed26 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Fri, 18 Jan 2019 16:28:47 +0800 Subject: [PATCH] . --- chapter2/mysite/myapp/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chapter2/mysite/myapp/views.py b/chapter2/mysite/myapp/views.py index 6749f87..65d3a16 100644 --- a/chapter2/mysite/myapp/views.py +++ b/chapter2/mysite/myapp/views.py @@ -29,6 +29,6 @@ def crawl(request): def result(request): from_type_info = json.loads(Datas.objects.filter(key='from_type').first().data) - top10_sells = Top10Sells.objects.order_by('id').values() + top10_sells = [entry for entry in Top10Sells.objects.order_by('id').values()] return render(request, 'myapp/result.html', {"from_type_info": from_type_info, "top10_sells": top10_sells}) \ No newline at end of file