示例#1
0
文件: blog.py 项目: jmichiel/YUIdemo
 def Save(self, **data):
     self.applyData(self.context, **data)
     flash("Blog entry '%s' updated!" % self.context.title, type='blog')
     self.redirect(self.url(self.context, 'view'))
示例#2
0
文件: blog.py 项目: jmichiel/YUIdemo
 def Add(self, **data):
     entry = BlogEntry()
     self.applyData(entry, **data)
     grok.getSite()[quote_plus(entry.title)] = entry
     flash("New blog entry '%s' added!" % entry.title, type='blog')
     self.redirect(self.url(entry))