add a latest method to query the latest x events

This commit is contained in:
2017-11-23 14:15:12 +01:00
parent 92470514c4
commit 68c484afc9
8 changed files with 81 additions and 77 deletions

View File

@@ -30,7 +30,6 @@ class DeleteEventPhoto(PermissionRequiredMixin, mixins.EventDetailMixin,
class EventArchiveIndex(mixins.EventArchiveMixin, generic.ArchiveIndexView):
"""Index of the event archive, displays the upcoming events first."""
allow_empty = True
ordering = ('-start', '-end')
class EventArchiveMonth(mixins.EventArchiveMixin, generic.MonthArchiveView):
@@ -73,7 +72,7 @@ class EventForm(PermissionRequiredMixin, mixins.EventDetailMixin,
if self.kwargs.get('pk') else models.Event()
class EventGallery(mixins.EventDetailMixin, generic.ListView):
class EventGallery(generic.ListView):
"""Display a overview of all event photo albums."""
template_name = 'events/photo_gallery.html'
queryset = models.Event.objects.filter(