git » blitiri » commit 1d4cf9c

Add a configuration option to enable the comments support

author Leandro Lucarella
2008-08-07 01:51:50 UTC
committer Alberto Bertogli
2008-08-08 22:53:20 UTC
parent 68d0af399627dab98e5206f7df26eb354f7d4ce5

Add a configuration option to enable the comments support

blitiri.cgi +4 -1
config.py.sample +3 -0

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"