use week title in email
This commit is contained in:
parent
778b6836de
commit
5b2670859f
3 changed files with 16 additions and 3 deletions
|
|
@ -43,6 +43,19 @@ def format_week(week):
|
|||
extra = ''
|
||||
return '%s - %s%s' % (a, b, extra)
|
||||
|
||||
def format_subject(monday):
|
||||
a = datetime.strptime(monday, '%Y-%m-%d')
|
||||
b = (a + timedelta(days=6))
|
||||
fmt = '%b %d'
|
||||
a = a.strftime(fmt)
|
||||
b = b.strftime(fmt)
|
||||
subject = '%s - %s | Phantas.ma' % (a, b)
|
||||
|
||||
extra = models.Week.objects.filter(monday=monday).first()
|
||||
if extra and extra.title:
|
||||
subject = '%s | %s' % (extra.title, subject)
|
||||
return subject
|
||||
|
||||
def get_byline(week):
|
||||
extra = models.Week.objects.filter(monday=week).first()
|
||||
if extra:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue