예제 #1
0
    def get(self, *args, **kwargs):

        traders_query = Trader.all().order('-created_on')
        traders = traders_query.fetch(50)
        kwargs['data']=json.encode(traders)
        
        JsonBaseHandler.get(self,*args,**kwargs)
예제 #2
0
    def get(self):

        traders_query = Trader.all().order('-created_on')
        traders = traders_query.fetch(10)
        
        if len(traders) == 0:
            logger.info('No traders assign for user %s', users)
            

        template_values={
                'traders':traders
        }

        template= jinja_environment.get_template('templates/trader_list.html')

        self.response.out.write(template.render(template_values))