Esempio n. 1
0
	def submit(self):

		'''
		request.get('project[Title]')
		request.get('project[BriefAbstract]')
		request.get('project[LongAbstract]')
		request.get('project[HighImpactDescription]')
		request.get('project[SustainabilityDescription]')
		request.get('project[InnovationDescription]')
		request.get('project[BudgetDescription]')
		request.get('project[BudgetNotes]')
		mdb.Blob(request.POST['project[Image]'].value)
		request.POST['project[Image]'].type
		mdb.Blob(request.POST['project[BudgetWorksheet]'].value)
		request.POST['project[BudgetWorksheet]'].type
		request.get_all('project[CountryIds]')
		mdb.key(request.get('project[BudgetRange]'))
		mdb.key(request.get('project[DevelopmentSector]'))
		'''

		valid, msg = con.validate_project_submission(self.request)
		if valid:
			con.save_project_submission(self.request)
			self.renderCmsApp('/projects/submit_completed')
		else:
			self.context.update({
				'form_error':		msg,
				'devsectors':		DevelopmentSector.query(),
				'budgetranges':		BudgetRange.query(),
				'countries':		Countries
			})
			self.renderCmsApp('/projects/submit_main')
Esempio n. 2
0
	def get(self):
		var = 23
		self.context.update({
			'devsectors':		DevelopmentSector.query(),
			'budgetranges':		BudgetRange.query(),
			'countries':		Countries
		})
		self.renderCmsApp('/projects/submit_main')