Exemplo n.º 1
0
 def GET(self, id):
     i = web.input(context='all', start=0, order=default_order, desc='desc', query='')
     start = int(i.start)
     user_id = session.is_logged() and session.get_user_id()
     
     results, num_results = applicants.query(query=i.query, context=i.context, 
         offset=start and start - 1, limit=results_per_page+2, order=i.order + ' ' + i.desc, 
         user_id=user_id)
     
     pager = web.storage(paging.get_paging_results(start, num_results, 
         int(id), results, results_per_page))
     
     counts = applicants.get_counts()
     
     user = session.get_session()
     
     applicant = applicants.get_by_id(id)
     
     _comments = comments.get_comments(applicant.id)
     
     _votes = votes.get_votes(applicant.id)
     
     stats = applicants.get_stats()
     
     return view.layout(
         view.applicant(applicant, _comments, _votes, user, pager, i), 
         user, i.context, counts, i.query, stats)
Exemplo n.º 2
0
    def GET(self, id):
        i = web.input(context='all',
                      start=0,
                      order=default_order,
                      desc='desc',
                      query='')
        start = int(i.start)
        user_id = session.is_logged() and session.get_user_id()

        results, num_results = applicants.query(query=i.query,
                                                context=i.context,
                                                offset=start and start - 1,
                                                limit=results_per_page + 2,
                                                order=i.order + ' ' + i.desc,
                                                user_id=user_id)

        pager = web.storage(
            paging.get_paging_results(start, num_results, int(id), results,
                                      results_per_page))

        counts = applicants.get_counts()

        user = session.get_session()

        applicant = applicants.get_by_id(id)

        _comments = comments.get_comments(applicant.id)

        _votes = votes.get_votes(applicant.id)

        stats = applicants.get_stats()

        return view.layout(
            view.applicant(applicant, _comments, _votes, user, pager, i), user,
            i.context, counts, i.query, stats)
Exemplo n.º 3
0
 def GET(self, module_id):
     module = modules.get_module(module_id)
     _tags = tags.get_tags(module_id)
     _comments = comments.get_comments(module_id)
     related_module = modules.get_related(module_id)
 
     return render.layout(view.show_module(module, _tags, _comments, related_module, misc.get_pub_id()), 
         title=module.title + ' - Google Modules')
Exemplo n.º 4
0
    def GET(self, module_id):
        module = modules.get_module(module_id)
        _tags = tags.get_tags(module_id)
        _comments = comments.get_comments(module_id)
        related_module = modules.get_related(module_id)

        return render.layout(view.show_module(module, _tags,
                                              _comments, related_module,
                                              misc.get_pub_id()),
                             title=module.title + ' - Google Modules')