Commit 3d7228dc authored by Mario Chirinos's avatar Mario Chirinos

tatatus page

parent aac479c9
......@@ -142,10 +142,12 @@ def status(request):
for p in tPublishers:
status = {}
status["docs"] = News.objects.filter(publisher=p).count()
status["origen"]=p.region+", "+p.country
if status["docs"] > 0:
status["startDate"]=News.objects.filter(publisher=p).order_by('date')[0].date
status["endDate"]=News.objects.filter(publisher=p).order_by('-date')[0].date
status["status"]=(datetime.datetime.now(datetime.timezone.utc)-status["endDate"]).days
status["origen"]=p.region+", "+p.country
tdic[p.name]=status
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment