1. Colin Copeland
  2. django-basic-events

Commits

Mikela Clemmons  committed 194628d

changed tag such that it only shows upcoming events

  • Participants
  • Parent commits f52cea5
  • Branches default

Comments (0)

Files changed (1)

File events/templatetags/event_tags.py

View file
 def lastest_events(count):
     events = None
     if isinstance(count, int):
-        events = models.Event.objects.order_by('-begin_date')[:count]
+        events = models.Event.published.upcoming().order_by('-begin_date')[:count]
     return {'events': events}