This commit is contained in:
guange 2019-01-18 10:27:30 +08:00
parent 7b669f833b
commit 2da62094cc
1 changed files with 5 additions and 5 deletions

View File

@ -10,13 +10,13 @@ def index(request):
return render(request, 'myapp/index.html')
def crawl(request):
# info = scrapy_client.get_scrapy_info()
crawl_info = CrawlInfos.objects.order_by('-id').first()
platform_info = get_platform_info()
# info = scrapy_client.get_scrapy_info()
crawl_info = CrawlInfos.objects.order_by('-id').first()
platform_info = get_platform_info()
news = News.objects.order_by('-id').all()[0:20]
return render(request, 'myapp/crawl.html', {"crawl_info": crawl_info,
return render(request, 'myapp/crawl.html', {"crawl_info": crawl_info,
"platform_info":json.dumps(platform_info),
"news": news})
def result(request):
return render(request, 'myapp/result.html')
return render(request, 'myapp/result.html')