This commit is contained in:
parent
7b669f833b
commit
2da62094cc
|
@ -10,13 +10,13 @@ def index(request):
|
||||||
return render(request, 'myapp/index.html')
|
return render(request, 'myapp/index.html')
|
||||||
|
|
||||||
def crawl(request):
|
def crawl(request):
|
||||||
# info = scrapy_client.get_scrapy_info()
|
# info = scrapy_client.get_scrapy_info()
|
||||||
crawl_info = CrawlInfos.objects.order_by('-id').first()
|
crawl_info = CrawlInfos.objects.order_by('-id').first()
|
||||||
platform_info = get_platform_info()
|
platform_info = get_platform_info()
|
||||||
news = News.objects.order_by('-id').all()[0:20]
|
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),
|
"platform_info":json.dumps(platform_info),
|
||||||
"news": news})
|
"news": news})
|
||||||
|
|
||||||
def result(request):
|
def result(request):
|
||||||
return render(request, 'myapp/result.html')
|
return render(request, 'myapp/result.html')
|
Loading…
Reference in New Issue