Move frontpage_dart option into new live config.

Enabling home page roadblocks has never been so easy!
This commit is contained in:
Neil Williams
2012-07-30 15:50:38 -07:00
parent ccbdf5c7ea
commit 4a4543b38b
3 changed files with 6 additions and 5 deletions

View File

@@ -351,9 +351,6 @@ static_secure_domain =
static_pre_gzipped = false
static_secure_pre_gzipped = false
# make frontpage 100% dart
frontpage_dart = false
# -- translator UI --
# enable/disable access to the translation UI in /admin/i18n
translator = true
@@ -497,3 +494,5 @@ beaker.session_secret = somesecret
# is enabled, then this configuration will be found by the app in zookeeper. to
# write it to zookeeper, use the writer script: scripts/write_live_config.
[live_config]
# make frontpage 100% dart
frontpage_dart = false

View File

@@ -131,7 +131,6 @@ class Globals(object):
'disable_ratelimit',
'amqp_logging',
'read_only_mode',
'frontpage_dart',
'allow_wiki_editing',
'heavy_load_mode',
's3_media_direct',
@@ -178,6 +177,9 @@ class Globals(object):
}
live_config_spec = {
ConfigValue.bool: [
'frontpage_dart',
],
}
def __init__(self, global_conf, app_conf, paths, **extra):

View File

@@ -3501,7 +3501,7 @@ class ComScore(CachedTemplate):
def render_ad(reddit_name=None, codename=None, keyword=None):
if not reddit_name:
reddit_name = g.default_sr
if g.frontpage_dart:
if g.live_config["frontpage_dart"]:
return Dart_Ad("reddit.dart", reddit_name, keyword).render()
try: