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)
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))