ics(...,calname=False)

This commit is contained in:
mdipierro
2013-05-17 13:53:32 -05:00
parent 579f0d752f
commit 7576d85dba
2 changed files with 5 additions and 3 deletions
+1 -1
View File
@@ -1 +1 @@
Version 2.4.6-stable+timestamp.2013.05.16.22.02.34
Version 2.4.6-stable+timestamp.2013.05.17.13.52.49
+4 -2
View File
@@ -127,7 +127,8 @@ def csv(value):
return ''
def ics(events, title=None, link=None, timeshift=0, **ignored):
def ics(events, title=None, link=None, timeshift=0, calname=True,
**ignored):
import datetime
title = title or '(unkown)'
if link and not callable(link):
@@ -135,7 +136,8 @@ def ics(events, title=None, link=None, timeshift=0, **ignored):
'[id]', str(item['id']))
s = 'BEGIN:VCALENDAR'
s += '\nVERSION:2.0'
s += '\nX-WR-CALNAME:%s' % title
if not calname is False:
s += '\nX-WR-CALNAME:%s' % (calname or title)
s += '\nSUMMARY:%s' % title
s += '\nPRODID:Generated by web2py'
s += '\nCALSCALE:GREGORIAN'