Beispiel #1
0
 def render(self, request, place, context, *args, **kwargs):
     number_events = self.get_config().get('limit').get_value()
     events_list = self.get_queryset(request, context)[:number_events]
     if self.get_config().get('filtering_section', False) and not events_list:
         events_list = get_events(request, filtering_section=False)[:number_events]
     return self.render_block(request, template_name='event/block_latest.html',
                              block_title=_('Latest events'),
                              context={'events_list': events_list})
Beispiel #2
0
 def render(self, request, place, context, *args, **kwargs):
     number_events = self.get_config().get('limit').get_value()
     events_list = self.get_queryset(request, context)[:number_events]
     if self.get_config().get('filtering_section',
                              False) and not events_list:
         events_list = get_events(request,
                                  filtering_section=False)[:number_events]
     return self.render_block(request,
                              template_name='event/block_latest.html',
                              block_title=_('Latest events'),
                              context={'events_list': events_list})
Beispiel #3
0
 def get_contents(self, request=None, context=None, section=None):
     events_list = get_events(request, filtering_section=False)
     return events_list
Beispiel #4
0
 def get_contents(self, request=None, context=None, section=None):
     events_list = get_events(request, filtering_section=False)
     return events_list
 def get_contents(self, request=None, context=None, section=None):
     event_list = get_events(request)
     return event_list
 def get_contents(self, request=None, context=None, section=None):
     number_events = self.get_config().get('limit', []).get_value()
     event_list = get_events(request, number_events)
     return event_list