Use new zamboni URLs; bug 580124
This commit is contained in:
Родитель
1c011e50ac
Коммит
a75f49c431
|
@ -328,7 +328,7 @@ class Addon(amo.models.ModelBase):
|
|||
@property
|
||||
def contribution_url(self, lang=settings.LANGUAGE_CODE,
|
||||
app=settings.DEFAULT_APP):
|
||||
return '/%s/%s/addons/contribute/%d' % (lang, app, self.id)
|
||||
return reverse('addons.contribute', args=[self.id])
|
||||
|
||||
@property
|
||||
def thumbnail_url(self):
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
{# The id triggers a dropdown, so don't expose it if there isn't a
|
||||
suggested amount (i.e., only one choice). #}
|
||||
{% if has_suggested %}id="contribute-button"{% endif %}
|
||||
href="{{ remora_url('/addons/contribute/{0}?source={1}'|f(addon.id, src)) }}">
|
||||
href="{{ url('addons.contribute', addon.id)|urlparams(source=src) }}">
|
||||
<b></b>{{ _('Contribute') }}
|
||||
</a>
|
||||
|
||||
|
@ -75,7 +75,7 @@
|
|||
|
||||
{% if has_suggested %}
|
||||
<div id="contribute-box" class="jqmWindow">
|
||||
<form action="/addons/contribute/{{ addon.id }}" method="get">{# TODO reverse URL #}
|
||||
<form action="{{ url('addons.contribute', addon.id) }}" method="get">
|
||||
<input type="hidden" name="source" value="{{ src }}"/>
|
||||
<h2>{{ _('Make a Contribution') }}</h2>
|
||||
<p class="support">
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
{% if addon.takes_contributions %}
|
||||
{# TODO(jbalogh): reverse #}
|
||||
{% set base = '/addons/contribute/{0}?source=direct'|f(addon.id) %}
|
||||
{% set base = url('addons.contribute', addon.id)|urlparams(source='direct') %}
|
||||
<div class="contribute">
|
||||
{% if addon.suggested_amount is not none %}
|
||||
{% trans url=base|urlparams(type='suggested')|escape,
|
||||
|
|
|
@ -84,7 +84,7 @@
|
|||
|
||||
{%- if addon.wants_contributions -%}
|
||||
<contribution_data>
|
||||
<link>{{ addon.contribution_url|absolutify|urlparams(src='api') }}</link>
|
||||
<link>{{ addon.contribution_url|absolutify|urlparams(source='api') }}</link>
|
||||
<suggested_amount currency="USD">
|
||||
{{ addon.suggested_amount }}
|
||||
</suggested_amount>
|
||||
|
|
|
@ -220,7 +220,7 @@ class APITest(TestCase):
|
|||
needles = (
|
||||
'<addon id="4664">',
|
||||
"<contribution_data>",
|
||||
"%s/en-US/firefox/addons/contribute/4664?src=api</link>"
|
||||
"%s/en-US/firefox/addon/4664/contribute/?source=api</link>"
|
||||
% settings.SITE_URL,
|
||||
"<meet_developers>",
|
||||
"%s/en-US/firefox/addon/4664/developers?src=api"
|
||||
|
|
Загрузка…
Ссылка в новой задаче