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'))
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))