always add title

This commit is contained in:
j 2023-09-23 17:30:03 +02:00
parent 29b99d2cd2
commit 99fa247fd5

View file

@ -24,10 +24,11 @@ def week(year, month, day):
year = int(year)
archive_week = archive.filter(year=year, week=week).order_by('published')
context['weeks'] = get_weeks(archive)
context['this_week'] = date.strftime('%Y-%m-%d')
monday = context['this_week'] = date.strftime('%Y-%m-%d')
context['this_year'] = date.strftime('%Y')
context['week_title'] = 'Phantas.ma weekly update %s' % views.format_week(monday)
extra = models.Week.objects.filter(monday=context['this_week']).first()
if extra:
context['week_title'] = extra.title
context['week_title'] += ': ' + extra.title
context['items'] = archive_week
return render_to_string("weekly_email.html", context)