stevencoding / django-basic-apps

Automatically exported from code.google.com/p/django-basic-apps
0 stars 0 forks source link

events: get_upcoming_events template tag #34

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
It would be nice to be able to get upcoming events using a template tag. I 
wrote a rough version of 
it, but it doesn't make much sense to get EventTime instances from 
"get_upcoming_events".

Example:
    {% get_upcoming_events 10 as upcoming_events %}

The attached events.py should go in basic/events/templatetags/

Original issue reported on code.google.com by sebnow@gmail.com on 31 Jan 2009 at 4:47

Attachments:

GoogleCodeExporter commented 8 years ago
Thank you for your contribution. It has been added :)

Original comment by npbor...@gmail.com on 31 Jan 2009 at 5:03

GoogleCodeExporter commented 8 years ago
There was a small bug in the template tag - it didn't return an empty string so 
"None" shows up in the template 
output. Patch is attached. Sorry :P.

Original comment by sebnow@gmail.com on 31 Jan 2009 at 8:32

Attachments: