Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Rename get_promoted_links to sample_promoted_links.

  • Loading branch information...
commit d578e3a3a390dbc922a6bd508934bfd596ad4040 1 parent 8075fa8
@bsimpson63 bsimpson63 authored
Showing with 3 additions and 3 deletions.
  1. +2 −2 r2/r2/controllers/listingcontroller.py
  2. +1 −1  r2/r2/lib/promote.py
View
4 r2/r2/controllers/listingcontroller.py
@@ -306,8 +306,8 @@ def spotlight(self):
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
2  r2/r2/lib/promote.py
@@ -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.
Please sign in to comment.
Something went wrong with that request. Please try again.