[web2py] Re: attachment;filename=%s.ics

2012-04-26 Thread Annet
Hi Anthony, It should also work without the extra parentheses around IS_SLUG: > > 'attachment;filename=event_%s_%s.ics' % (IS_SLUG()(organization.name)[0], > row.id) > Indeed, it does. I must have overlooked the opening and closing parentheses. Kind regards, Annet.

[web2py] Re: attachment;filename=%s.ics

2012-04-26 Thread Anthony
It should also work without the extra parentheses around IS_SLUG: 'attachment;filename=event_%s_%s.ics' % (IS_SLUG()(organization.name)[0], row.id) Anthony On Thursday, April 26, 2012 6:16:38 AM UTC-4, Annet wrote: > > This is what it has to be: > > {{response.headers['Content-Disposition'] =

[web2py] Re: attachment;filename=%s.ics

2012-04-26 Thread Annet
This is what it has to be: {{response.headers['Content-Disposition'] = 'attachment;filename=event_%s_%s.ics' % ((IS_SLUG()(organization.name)[0]), row.id)}}

[web2py] Re: attachment;filename=%s.ics

2012-04-26 Thread Annet
Hi Cédric, > It's straight python I think. That's what I thought, but it results in the following error ticket. Traceback (most recent call last): File "/Library/Python/2.5/site-packages/web2py/gluon/restricted.py", line 205, in restricted exec ccode in environment File "/Library/Pytho

[web2py] Re: attachment;filename=%s.ics

2012-04-25 Thread Cédric Mayer
You do not give your context so I don't know whether you have access to row, but if you have: {{response.headers['Content-Disposition'] = "attachment;filename=%s_%s.ics" % ( IS_SLUG()(organization.name)[0], row.id)}} It's straight python I think. Le mercredi 25 avril 2012 10:47:57 UTC+2, Annet