Пример #1
0
 def get(self, storyid):
     accountid = self.session.get('accountid')
     account = Account.get_by_accountid(accountid)
     if 1 != account.mod:
         return
     story_ = Story.get_by_id(int(storyid))
     pagelist = []
     for page in story_.pages:
         pagelist.append(page)
     Page.new(account, story_, len(pagelist) + 1)
     self.redirect("/story/" + storyid)
Пример #2
0
	def get(self,storyid):
		accountid = self.session.get('accountid')
		account = Account.get_by_accountid(accountid)
		if 1 != account.mod:
			return
		story_ = Story.get_by_id(int(storyid))
		pagelist = []
		for page in story_.pages:
			pagelist.append(page)
		Page.new(account,story_,len(pagelist)+1)
		self.redirect("/story/"+storyid)
Пример #3
0
 def post(self, keyid):  #logout
     accountid = self.session.get('accountid')
     account = Account.get_by_accountid(accountid)
     story_ = Story.get_by_id(int(keyid))
     page = Page.new(account, story_)
     pageid = int(self.request.get('pageid'))
     pageToImport = Page.get_by_id(int(pageid))
     for link in pageToImport.contents:
         PageContentLink.new(page, link.content)
     self.redirect('/story/' + keyid)
Пример #4
0
	def post(self,keyid): #logout
		accountid = self.session.get('accountid')
		account = Account.get_by_accountid(accountid)
		story_ = Story.get_by_id(int(keyid))
		page = Page.new(account,story_)
		pageid = int(self.request.get('pageid'))
		pageToImport = Page.get_by_id(int(pageid))
		for link in pageToImport.contents:
			PageContentLink.new(page,link.content)
		self.redirect('/story/'+keyid)
Пример #5
0
 def post(self):  #logout
     accountid = self.session.get('accountid')
     account = Account.get_by_accountid(accountid)
     if 1 != account.mod:
         return
     page = Page.new(account)
     params = {}
     for key in self.request.arguments():
         params[key] = self.request.get(key)
     page.setter(params)
     self.redirect('/page')
Пример #6
0
	def post(self): #logout
		accountid = self.session.get('accountid')
		account = Account.get_by_accountid(accountid)
		if 1 != account.mod:
			return
		page = Page.new(account)
		params = {}
		for key in self.request.arguments():
			params[key] = self.request.get(key)
		page.setter(params)
		self.redirect('/page')
Пример #7
0
def test_page_new():
	facebookid = "*****@*****.**"
	account = Account.get_by_facebookid(facebookid)
	page = Page.new(account)
	assert None != page
	return