This commit is contained in:
guange 2019-01-18 17:30:58 +08:00
parent cfea494f93
commit 77fc37c92c
2 changed files with 4 additions and 1 deletions

View File

@ -9,6 +9,7 @@
<script type="text/javascript">
var from_type_info = {{from_type_info|safe}};
var top10_sells = {{top10_sells|safe}};
var last_month_sell = {{last_month_sell|safe}};
</script>
<script src="{% static "scripts/Plugin/jquery-3.3.1.min.js" %}"></script>

View File

@ -30,5 +30,7 @@ def crawl(request):
def result(request):
from_type_info = json.loads(Datas.objects.filter(key='from_type').first().data)
top10_sells = [entry for entry in Top10Sells.objects.order_by('id').values()]
last_month_sell = json.loads(Datas.objects.filter(key='last_month_sell').first().data)
return render(request, 'myapp/result.html', {"from_type_info": from_type_info,
"top10_sells": top10_sells})
"top10_sells": top10_sells, "last_month_sell": last_month_sell})