Use promote.cost_per_X functions in Promote_Graph

This commit is contained in:
Keith Mitchell
2013-01-10 11:06:43 -08:00
parent a6c9364006
commit 052b4b8a85

View File

@@ -3614,8 +3614,8 @@ class Promote_Graph(Templated):
if day in self.promo_traffic:
delivered, clicks = self.promo_traffic[day]
if i in market and day < today:
cpm = "$%.2f" % (market[i] * 1000. / max(delivered, 1))
cpc = "$%.2f" % (market[i] * 1. / max(clicks, 1))
cpm = "$%.2f" % promote.cost_per_mille(market[i], delivered)
cpc = "$%.2f" % promote.cost_per_click(market[i], clicks)
delivered = format_number(delivered, c.locale)
clicks = format_number(clicks, c.locale)
if day == today: