Ejemplo n.º 1
0
 def post(self):
     subject = self.request.get('subject')
     content = self.request.get('content')
     if not subject or not content:
         self.render('newEntry.html', subject = subject, \
                     content = content, error = ERROR)
     else:
         blogEntry = BlogEntry(subject = subject, content = content)
         blogEntry.put()
         getBlogEntries(True)
         self.redirect('/blog/%s' % blogEntry.key().id())
Ejemplo n.º 2
0
 def get(self):
     blogEntries, seconds = getBlogEntries()
     self.render('blog.html', blogEntries = blogEntries, seconds = seconds)