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 }}

- +