def get(self): setup_drafts = Draft.query(Draft.in_setup == True).fetch() setup_ids = [] for draft in setup_drafts: setup_ids.append(draft.key.integer_id()) # logging.error(setup_ids) progress_drafts = Draft.query(Draft.in_progress == True).fetch() progress_ids = [] for draft in progress_drafts: progress_ids.append(draft.key.integer_id()) # logging.error(progress_ids) done_drafts = Draft.query(Draft.is_done == True).fetch() done_ids = [] for draft in done_drafts: done_ids.append(draft.key.integer_id()) # logging.error(done_ids) self.render('front.html', setup_ids = setup_ids, progress_ids = progress_ids, done_ids = done_ids)
def get(self): setup_drafts = Draft.query(Draft.in_setup == True).fetch() setup_ids = [] for draft in setup_drafts: setup_ids.append(draft.key.integer_id()) # logging.error(setup_ids) progress_drafts = Draft.query(Draft.in_progress == True).fetch() progress_ids = [] for draft in progress_drafts: progress_ids.append(draft.key.integer_id()) # logging.error(progress_ids) done_drafts = Draft.query(Draft.is_done == True).fetch() done_ids = [] for draft in done_drafts: done_ids.append(draft.key.integer_id()) # logging.error(done_ids) self.render('front.html', setup_ids=setup_ids, progress_ids=progress_ids, done_ids=done_ids)
def post(self): name = self.request.get('name') pack1 = self.request.get('pack1') pack2 = self.request.get('pack2') pack3 = self.request.get('pack3') draft = Draft.create(coordinator_key=self.user.key, name=name, pack_codes=[pack1, pack2, pack3]) draft.put() self.redirect('/draft/%s' % str(draft.key.integer_id()))