one useless fix, one valid fix
This commit is contained in:
Родитель
95643c7e2b
Коммит
f82e015b13
|
@ -35,7 +35,7 @@
|
|||
{{ amo.ADDON_TYPE[app.type] }};
|
||||
{{ amo.ADDON_PREMIUM_TYPES[app.premium_type] }}
|
||||
{% if price %}
|
||||
({{ price.get_tier_name() }})
|
||||
({{ price.tier_locale() }})
|
||||
{% endif %}
|
||||
</dd>
|
||||
<dt>{{ _('Submitted') }}</dt>
|
||||
|
|
|
@ -152,13 +152,9 @@ def product_as_dict(request, product, purchased=None, receipt_type=None,
|
|||
ret.update({'previews': previews})
|
||||
|
||||
if product.has_price():
|
||||
# Note: These should really not be doing this, if get_price
|
||||
# or get_price_locale is empty it means there is no price for this
|
||||
# region.
|
||||
ret.update({
|
||||
'price': product.get_price(region=request.REGION.id) or '0',
|
||||
'priceLocale': (product.get_price_locale(region=request.REGION.id)
|
||||
or _('Free')),
|
||||
'price': product.get_price(region=request.REGION.id),
|
||||
'priceLocale': product.get_price_locale(region=request.REGION.id),
|
||||
})
|
||||
|
||||
if request.amo_user:
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
{{ market_button(product, classes=classes) }}
|
||||
<div class="author lineclamp vital">{{ product.current_version.developer_name }}</div>
|
||||
{%- endif %}
|
||||
<div class="price vital">{{ product.get_price_locale(region=request.REGION.id) or _('Free') }}</div>
|
||||
<div class="price vital">{% if product.is_premium() %}{{ product.get_price_locale(region=request.REGION.id) }}{% else %}Free{% endif %}</div>
|
||||
<div class="rating vital{{ ' unrated' if not product.total_reviews }}">
|
||||
{%- if tag != "a" -%}
|
||||
<a href="{{ product.get_ratings_url() }}" class="rating_link">
|
||||
|
|
|
@ -99,9 +99,8 @@ class TestMarketButton(amo.tests.TestCase):
|
|||
# The region is set to Spain, so the currency is set EUR
|
||||
# and the display is set to French.
|
||||
with self.activate('fr'):
|
||||
# TODO bug: 878215, find what the answer here is.
|
||||
with self.assertRaises(KeyError):
|
||||
market_tile(self.context, self.webapp)
|
||||
doc = pq(market_tile(self.context, self.webapp))
|
||||
eq_(doc('.price').text(), '')
|
||||
|
||||
def test_is_premium_purchased(self):
|
||||
AddonPurchase.objects.create(user=self.user, addon=self.webapp)
|
||||
|
|
Загрузка…
Ссылка в новой задаче