Ejemplo n.º 1
0
 def GET(self):
     petitions = db.select(['petition', 'signatory'], 
                 what='petition.id, petition.title, count(signatory.user_id) as signature_count',
                 where='petition.id = signatory.petition_id',
                 group='petition.id, petition.title',
                 order='count(signatory.user_id) desc'
                 )
     return render.petition_list(petitions)
Ejemplo n.º 2
0
    def GET(self):
        petitions = db.select(['petition', 'signatory'],
                    what='petition.id, petition.title, count(signatory.user_id) as signature_count',
                    where='petition.id = signatory.petition_id and petition.deleted is null',
                    group='petition.id, petition.title',
                    order='count(signatory.user_id) desc'
                    )

        msg, msg_type = helpers.get_delete_msg()
        return render.petition_list(petitions, msg)
Ejemplo n.º 3
0
    def GET(self):
        petitions = db.select(
            ["petition", "signatory"],
            what="petition.id, petition.title, count(signatory.user_id) as signature_count",
            where="petition.deleted is null and petition.published is not null "
            "and petition.id = signatory.petition_id  and signatory.deleted is null",
            group="petition.id, petition.title",
            order="count(signatory.user_id) desc",
        )

        msg, msg_type = helpers.get_delete_msg()
        return render.petition_list(petitions, msg)
Ejemplo n.º 4
0
    def GET(self):
        petitions = db.select(
            ['petition', 'signatory'],
            what=
            'petition.id, petition.title, count(signatory.user_id) as signature_count',
            where='petition.deleted is null and petition.published is not null '
            'and petition.id = signatory.petition_id  and signatory.deleted is null',
            group='petition.id, petition.title',
            order='count(signatory.user_id) desc')

        msg, msg_type = helpers.get_delete_msg()
        return render.petition_list(petitions, msg)