From 62f1cbed4c84092c790679e7a9294f32ea77b7fc Mon Sep 17 00:00:00 2001 From: Douglas Bagnall Date: Sat, 10 Jul 2010 20:02:32 +1200 Subject: [PATCH] add environment variable switch to show booki servers in drop-down option list --- objavi/config.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/objavi/config.py b/objavi/config.py index d5ea05d..029b32e 100644 --- a/objavi/config.py +++ b/objavi/config.py @@ -20,6 +20,7 @@ """This module contains constant values used to produce books. """ +from os import environ as _environ #XXX eventually, read in a real config file. #XXX Some of these values should be editable via an admin cgi script @@ -38,6 +39,8 @@ LOGDIR = 'log' REDIRECT_LOG = True LOG_ROTATE_SIZE = 1000000 +SHOW_BOOKI_SERVERS = bool(_environ.get("SHOW_BOOKI_SERVERS", False)) + HTDOCS = 'htdocs' BOOKI_BOOK_DIR = 'htdocs/booki-books' BOOKI_BOOK_URL = '/booki-books' @@ -149,7 +152,7 @@ SERVER_DEFAULTS = { 'lang': 'en', 'dir': 'LTR', 'toc-encoding': None, - 'display': False, + 'display': SHOW_BOOKI_SERVERS, 'interface': 'Booki', 'toc_header': 'Table of Contents', }, -- 2.11.4.GIT