jonge-democraten / website

JD website
https://jongedemocraten.nl
MIT License
6 stars 2 forks source link

Exportfunctie #83

Closed trolando closed 9 years ago

trolando commented 9 years ago

We need export function for events that exports to HTML that can be used for newsletter.

Would be nice to be able to do something like this:

from events import export_to_newsletter_html html = export_to_newsletter_html(sites.get_site())

Or something like that.

The format we'd like has <h2>Agenda</h2><h3>date: title</h3><p>Description</p><h3>next date: title</h3><p>Description</p>

Then when someone makes new newsletter in admin, it will be prefilled with content of events for next month or so.

Pi2048 commented 9 years ago

I added an HTML export view to mezzanine-fullcalendar in the latest commit (5eb2ebbf3457ece882aa357c82ae5c188207656f). If you'd rather implement this as a utility function, I think the required changes would be easy.

For details, please see https://github.com/jonge-democraten/mezzanine-fullcalendar/commit/5eb2ebbf3457ece882aa357c82ae5c188207656f.