def txn(): entity = WordCount.get_by_key_name(word) if entity is None: entity = WordCount(key_name=word, count=1) else: entity.count += 1 entity.put()
def get(self): self.response.out.write( template.render('word_counts.html', { "upload_url": blobstore.create_upload_url('/upload'), "word_counts": WordCount.all().order('-count').fetch(30) } ))