Пример #1
0
 def render(self, context):
     announcements = get_latest_announcements(self.limit)
     if announcements and (int(self.limit) == 1):
         context[self.var_name] = announcements[0]
     else:
         context[self.var_name] = announcements
     return ''
Пример #2
0
def community(request):
    return render(request, 'accounts/community.html', {
        'discussion_threads': DiscussionThread.objects.filter(is_public=True)[:10],
        'announcements': get_latest_announcements(4),
        'announce_calendar': get_announce_calendar(),
        'updated_portfolios': get_recently_updated_portfolios(15)
    })
Пример #3
0
def community(request):
    return render(request, 'accounts/community.html', {
        'discussion_threads': DiscussionThread.objects.filter(is_public=True)[:10],
        'announcements': get_latest_announcements(4),
        'announce_calendar': get_announce_calendar(),
        'updated_portfolios': get_recently_updated_portfolios(15)
    })
Пример #4
0
 def render(self, context):
     announcements = get_latest_announcements(self.limit) 
     if announcements and (int(self.limit) == 1):
         context[self.var_name] = announcements[0]
     else:
         context[self.var_name] = announcements
     return ''
Пример #5
0
 def items(self):
     return get_latest_announcements(50)
Пример #6
0
 def items(self):
     return get_latest_announcements(50)