From 1d4cf9ca0492dc1026d5a40cdb3f9bd9916dd073 Mon Sep 17 00:00:00 2001 From: Leandro Lucarella Date: Wed, 6 Aug 2008 22:51:50 -0300 Subject: [PATCH] Add a configuration option to enable the comments support --- blitiri.cgi | 5 ++++- config.py.sample | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/blitiri.cgi b/blitiri.cgi index 583a497..161449a 100755 --- a/blitiri.cgi +++ b/blitiri.cgi @@ -14,6 +14,9 @@ # Directory where entries are stored data_path = "/tmp/blog/data" +# Are comments allowed? (if False, comments_path option is not used) +enable_comments = False + # Directory where comments are stored (must be writeable by the web server) comments_path = "/tmp/blog/comments" @@ -820,7 +823,7 @@ def handle_cgi(): elif style: render_style() elif post: - render_html( [db.get_article(uuid)], db, year, True ) + render_html( [db.get_article(uuid)], db, year, enable_comments ) elif artlist: articles = db.get_articles() articles.sort(cmp = Article.title_cmp) diff --git a/config.py.sample b/config.py.sample index f145a3e..1f2c4ea 100644 --- a/config.py.sample +++ b/config.py.sample @@ -10,6 +10,9 @@ # Directory where entries are stored data_path = "/tmp/blog/data" +# Are comments allowed? (if False, comments_path option is not used) +enable_comments = False + # Directory where comments are stored (must be writeable by the web server) comments_path = "/tmp/blog/comments" -- 2.43.0