예제 #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
파일: views.py 프로젝트: hxrts/rhizome.org
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
파일: views.py 프로젝트: hgw/rhizome.org
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
파일: models.py 프로젝트: hgw/rhizome.org
 def items(self):
     return get_latest_announcements(50)
예제 #6
0
 def items(self):
     return get_latest_announcements(50)