Esempio n. 1
0
	def post(self):
		if self.request.get('id') != '':
			page = db.get(self.request.get('id'))
		else:
			page = Page()

		if page:
			page.title = self.request.get('title')
			page.alias = self.request.get('alias')
			page.content = self.request.get('content')
			page.user = users.get_current_user()
			page.put()
				
		self.redirect('/admin/pages?id='+ str(page.key()))