byline for week
This commit is contained in:
parent
688e0d22d4
commit
82edae60fb
7 changed files with 60 additions and 2 deletions
|
|
@ -42,6 +42,10 @@ def format_week(week):
|
|||
extra = ''
|
||||
return '%s - %s%s' % (a, b, extra)
|
||||
|
||||
def get_byline(week):
|
||||
extra = models.Week.objects.filter(monday=week).first()
|
||||
if extra:
|
||||
return extra.byline
|
||||
|
||||
def get_weeks(archive):
|
||||
weeks = sorted(set(archive.values_list('year', 'week')))
|
||||
|
|
@ -103,6 +107,7 @@ def archive(request, year=None, month=None, day=None, week=None):
|
|||
extra = models.Week.objects.filter(monday=context['this_week']).first()
|
||||
if extra:
|
||||
context['week_title'] = extra.title
|
||||
context['week_byline'] = extra.byline
|
||||
elif week:
|
||||
week = int(week)
|
||||
year = int(year)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue