def post(self): if not self.worker.has_labeled_an_image(): labeling = Labeling() labeling.image_url = self.experiment.images[0] labeling.worker = self.worker labeling.labels = self.request.get_all('label') labeling.time = int(self.request.get('time')) labeling.put() self.render('priv/first_stage_complete.html', {})
def post(self): labeling = Labeling() labeling.image_url = self.image_url(self.worker) labeling.worker = self.worker labeling.labels = self.request.get_all('label') labeling.time = int(self.request.get('time')) labeling.put() evaluator = Worker.all().filter('peer_worker = ', self.worker).get() taskqueue.add(queue_name='worker-notification', params={'key': evaluator.key()}) self.redirect(self.mturk_submit_url())