Rename get_promoted_links to sample_promoted_links.

This commit is contained in:
bsimpson63
2013-01-30 15:54:03 -05:00
parent 8075fa83c3
commit d578e3a3a3
2 changed files with 3 additions and 3 deletions

View File

@@ -306,8 +306,8 @@ class HotController(FixListing, ListingController):
n_promoted = 100
n_build = 10
promo_tuples = promote.get_promoted_links(c.user, c.site,
n_promoted)
promo_tuples = promote.sample_promoted_links(c.user, c.site,
n_promoted)
promo_tuples = sorted(promo_tuples,
key=lambda p: p.weight,
reverse=True)

View File

@@ -838,7 +838,7 @@ def randomized_promotion_list(user, site):
PromoTuple = namedtuple('PromoTuple', ['link', 'weight', 'campaign'])
def get_promoted_links(user, site, n=10):
def sample_promoted_links(user, site, n=10):
"""Return a random selection of promoted links.
Does not factor weights, as that will be done client side.