Lines Matching full:comments
12 added to it, and shows any existing comments.
29 middleware also needs a location to store the comments; we'll put them
48 app = Commenter(app, storage_dir='./comments')
70 default='./comments',
72 help='Place to put comment data into (default ./comments/)')
129 per-url data (the comments themselves). We'll keep them in pickles,
184 So far we're punting on actually adding the comments to the page. We
187 Doe', 'homepage': 'http://blog.johndoe.com', 'comments': 'Great
232 def format_comments(self, comments):
233 if not comments:
237 text.append('<h2><a name="comment-area"></a>Comments (%s):</h2>' % len(comments))
238 for comment in comments:
243 text.append(comment['comments'])
257 Accepting Comments
260 All of those pieces *display* comments, but still no one can actually
261 make comments. To handle this we'll take a little piece of the URL
262 space for our own, everything under ``/.comments``, so when someone
284 if req.path_info_peek() == '.comments':
295 comments = self.get_data(req.url)
297 body = self.add_to_end(body, self.format_comments(comments))
305 what comes after base_url. If it is ``.comments`` then we handle it
311 Then we get the data, add the comments, add the *form* to make new
312 comments, and return the result.
326 <form action="%s/.comments" method="POST">
334 Comments:<br>
335 <textarea name="comments" rows=10 style="width: 100%%"></textarea><br>
341 URL being commented on), ``name``, ``homepage``, and ``comments``.
386 comments = req.params['comments']
394 comments=comments,