From 882954901c5617077f73148d46aa462102320c8e Mon Sep 17 00:00:00 2001 From: andrey Date: Wed, 30 Aug 2017 16:38:48 +0300 Subject: [PATCH] =?UTF-8?q?=D0=B8=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=BD=D1=8B=20=D0=BF=D1=83=D1=82=D0=B8=20=D0=B2=20?= =?UTF-8?q?media?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- analytics/views.py | 16 ++++++++++++---- templates/analytics/base.html | 2 +- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/analytics/views.py b/analytics/views.py index 934c5ac..6ca748f 100644 --- a/analytics/views.py +++ b/analytics/views.py @@ -28,10 +28,10 @@ def index_view_decor(url): res1 = [] for i in row: k = i.split("$-$") - k = {'value': k[0], 'background': 'none'} if len(i.split("$-$")) == 1 else {'value': k[0], - 'background': k[ - 1]} + k = {'value': k[0], 'background': 'none'}\ + if len(i.split("$-$")) == 1 else {'value': k[0],'background': k[1]} res1.append(k) + res.append(res1) for i in res: for j in range(max - len(i)): @@ -44,7 +44,15 @@ def index_view_decor(url): date_create = time.ctime(os.stat(path).st_atime) - context = {'body': res, 'header': first, 'date_create': date_create, 'start': start, 'end': end} + context = { + 'body': res, + 'header': first, + 'date_create': date_create, + 'start': start, + 'end': end, + 'url': url, + } + context.update(func()) return render(request, url[1:-1] + '.html', context=context) diff --git a/templates/analytics/base.html b/templates/analytics/base.html index f134227..64d1492 100644 --- a/templates/analytics/base.html +++ b/templates/analytics/base.html @@ -7,7 +7,7 @@

Дата создания отчёта {{ date_create }}

- +