Exemple #1
0
    def get_context_data(self, **kwargs):
        context = super(CommitteesView, self).get_context_data(**kwargs)

        committees = Organization.committees().filter(name__startswith="Committee")
        context["committees"] = [c for c in committees if c.memberships.all()]

        subcommittees = Organization.committees().filter(name__startswith="Subcommittee")
        context["subcommittees"] = [c for c in subcommittees if c.memberships.all()]

        taskforces = Organization.committees().filter(name__startswith="Task Force")
        context["taskforces"] = [c for c in taskforces if c.memberships.all()]

        return context
Exemple #2
0
    def get_context_data(self, **kwargs):
        context = super(CommitteesView, self).get_context_data(**kwargs)

        committees = Organization.committees().filter(name__startswith='Committee')
        context['committees'] = [c for c in committees if c.memberships.all()]
        
        subcommittees = Organization.committees().filter(name__startswith='Subcommittee')
        context['subcommittees'] = [c for c in subcommittees if c.memberships.all()]

        taskforces = Organization.committees().filter(name__startswith='Task Force')
        context['taskforces'] = [c for c in taskforces if c.memberships.all()]
        
        return context
Exemple #3
0
 def test_committee_widget(self):
     for committee in Organization.committees():
         committee_url = '/committee/{}/widget/'.format(committee.slug)
         assert self.getPage(committee_url).status_code == 200
Exemple #4
0
 def test_committee_action_rss(self):
     for committee in Organization.committees():
         committee_url = '/committee/{}/actions/rss/'.format(committee.slug)
         assert self.getPage(committee_url).status_code == 200