Exemple #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 ''
Exemple #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)
    })
Exemple #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)
    })
Exemple #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 ''
Exemple #5
0
 def items(self):
     return get_latest_announcements(50)
Exemple #6
0
 def items(self):
     return get_latest_announcements(50)