Пример #1
0
    def get(self):
        deal = Deal.get_latest_deal()
        last_deal = Deal.all().order("-published").get()
        ### last_deal = None ### for testing

        # Only add this deal and call match if it's new!
        if last_deal is None or last_deal.title != deal.title or self.request.GET.has_key('force'):
            deal.put()
            match(deal, result_key=str(deal.key()))
            print ("new deal.  match submitted")
            print (deal.alltext)
        else:
            print ("existing deal")