Пример #1
0
	def post(self):
		question = Questions()
		question.question = self.request.get('question')
		question.question_type = self.request.get('response type')
		question.options = self.request.get_all('option')
		question.name = self.request.get('name')
		question.topic = self.request.get('topic')
		question.display = False
		question.put()
		
		self.redirect('/researcher/addquestions')
Пример #2
0
 def post(self, id):
     entity = Questions.get_by_id(long(id))
     if (self.request.get('toggledisplay') == 'true'):
         entity.display = True
     else:
         entity.display = False
     entity.put()
     self.redirect('/' + self.user_interface_name() + '/viewquestions/id=' + id)
Пример #3
0
 def get(self, id):
     page_title = "View Ratings"
     
     #retrieve values from the datastore
     entity = Questions.get_by_id(long(id))
     
     template_values = self.make_template_dict(
         page_title=page_title,
         entity=entity)
     
     template = JINJA_ENVIRONMENT.get_template('templates/question.html')
     self.response.write(template.render(template_values))
Пример #4
0
	def get(self):

		entities = Questions.query()
		
		page_title = "View Questions (Rate Trip)"
		
		template_values = {
			'page_title': page_title,
			'entities': entities,
			'extends_template' : self.get_template(),
		}
		
		template = JINJA_ENVIRONMENT.get_template('templates/viewquestions.html')
		self.response.write(template.render(template_values))