From 3d0e1971bf16feedd996127cf607c153440edac0 Mon Sep 17 00:00:00 2001 From: Max Goodman Date: Tue, 3 Sep 2013 14:19:41 -0700 Subject: [PATCH] Move sample multis list to live config. --- r2/example.ini | 5 ++--- r2/r2/lib/app_globals.py | 1 + r2/r2/lib/pages/pages.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/r2/example.ini b/r2/example.ini index fc3b9dc9f..2392e1963 100644 --- a/r2/example.ini +++ b/r2/example.ini @@ -528,9 +528,6 @@ wiki_page_registration_info = registration_info # Template names to record render timings for timed_templates = Reddit, Link, Comment, LinkListing, NestedListing, SubredditTopBar -# sample multireddits (displayed when a user has no multis) -sample_multis = /user/reddit/m/hello, /user/reddit/m/world - # employees that aren't admins or sponsors (Free gilding, admin distinguish, traffic viewing, etc.) employees = @@ -611,3 +608,5 @@ comment_tree_version_weights = 1:1, 2:0 # use **strong** markup for a larger font, and " \n" (
) to separate lines. goldvertisement_blurbs = "Make reddit better. Try %(reddit_gold)." "This year, give the gift of %(reddit_gold)s.|(and you should probably also give some other, better gifts)" goldvertisement_has_gold_blurbs = "**“Exquisite!”** \nGrab a drink and join us in [the lounge](/r/lounge)." +# sample multireddits (displayed when a user has no multis) +listing_chooser_sample_multis = /user/reddit/m/hello, /user/reddit/m/world diff --git a/r2/r2/lib/app_globals.py b/r2/r2/lib/app_globals.py index badb05700..7bb1f14e1 100755 --- a/r2/r2/lib/app_globals.py +++ b/r2/r2/lib/app_globals.py @@ -227,6 +227,7 @@ class Globals(object): ConfigValue.tuple: [ 'sr_discovery_links', 'fastlane_links', + 'listing_chooser_sample_multis', ], ConfigValue.dict(ConfigValue.int, ConfigValue.float): [ 'comment_tree_version_weights', diff --git a/r2/r2/lib/pages/pages.py b/r2/r2/lib/pages/pages.py index cee50956b..b83838e5b 100755 --- a/r2/r2/lib/pages/pages.py +++ b/r2/r2/lib/pages/pages.py @@ -4152,7 +4152,7 @@ class ListingChooser(Templated): }) def add_samples(self): - for path in g.sample_multis: + for path in g.live_config["listing_chooser_sample_multis"]: self.add_item( section="sample", name=path.rpartition('/')[2],