Skip to content

Instantly share code, notes, and snippets.

View andymckay's full-sized avatar

Andy McKay andymckay

View GitHub Profile
diff --git a/apps/amo/context_processors.py b/apps/amo/context_processors.py
index c76443a..97d2e87 100644
--- a/apps/amo/context_processors.py
+++ b/apps/amo/context_processors.py
@@ -66,11 +66,11 @@ def global_settings(request):
'href': remora_url('/users/logout?to=' + urlquote(request.path)),
})
- if request.amo_user.is_developer:
- tools_links.append({'text': _('Manage My Add-ons'),
diff --git a/configs/mysql-anonymous/anonymize.yml b/configs/mysql-anonymous/anonymize.yml
index f713ac4..6716db3 100644
--- a/configs/mysql-anonymous/anonymize.yml
+++ b/configs/mysql-anonymous/anonymize.yml
@@ -103,3 +103,5 @@ database:
random_email: email
versions:
nullify: approvalnotes
+ users_install:
+ random_email: email
diff --git a/apps/addons/views.py b/apps/addons/views.py
index 79d1056..7e82a78 100644
--- a/apps/addons/views.py
+++ b/apps/addons/views.py
@@ -561,10 +561,9 @@ def purchase_complete(request, addon, status):
log.debug('Paypal returned: %s for paykey: %s'
% (result, con.paykey[:10]))
if result == 'COMPLETED':
- # Markup the contribution suitably
- con.type = amo.CONTRIB_PURCHASE
def is_contribution_good(self):
# Checks that the IPN has been by and its all good.
con = self.get_contribution()
return (con.uuid == None
and con.transaction_id == uuid
and con.post_data)
@patch('paypal.check_purchase')
def test_result(self, check_purchase):
check_purchase.return_value = 'COMPLETED'
diff --git a/apps/addons/templates/addons/paypal_start.html b/apps/addons/templates/addons/paypal_start.html
index b4dd8cc..e1ea3c4 100644
--- a/apps/addons/templates/addons/paypal_start.html
+++ b/apps/addons/templates/addons/paypal_start.html
@@ -29,7 +29,7 @@
<h2>{{ _('Purchase Add-on') }}</h2>
{% endif %}
<div class="paypal-content">
- <span class="price">{{ addon.premium.get_price() }}</span>
+ <span class="price">{{ addon.premium.get_price_locale() }}</span>
diff --git a/apps/amo/utils.py b/apps/amo/utils.py
index 7e95970..ed70720 100644
--- a/apps/amo/utils.py
+++ b/apps/amo/utils.py
@@ -667,5 +667,8 @@ def log_cef(*args, **kwargs):
'cef.vendor': getattr(settings, 'CEF_VENDOR', 'Mozilla'),
'cef.version': getattr(settings, 'CEF_VERSION', '0'),
'cef.device_version': getattr(settings, 'CEF_DEVICE_VERSION', '0'), }
-
+ # Which presumes args[-1] is the request, which sucks. Maybe a keyword
diff --git a/media/js/zamboni/buttons.js b/media/js/zamboni/buttons.js
index e8dd77b..4434d7b 100644
--- a/media/js/zamboni/buttons.js
+++ b/media/js/zamboni/buttons.js
@@ -33,7 +33,8 @@ var webappButton = function() {
.click(function(e) {
e.preventDefault();
purchases.record($this, function(receipt) {
- purchases.install_app(manifestURL, receipt);
+ console.log($this);
diff --git a/media/js/zamboni/contributions.js b/media/js/zamboni/contributions.js
index 661e833..58d5534 100644
--- a/media/js/zamboni/contributions.js
+++ b/media/js/zamboni/contributions.js
@@ -34,10 +34,21 @@ var purchases = {
}
}
});
+ setTimeout(purchases.lookForThanks, 1000);
return false;
import amo
from addons.models import Addon
# Guids to update from builder.
guids = []
# Builder version to set.
id = ''
def run():
def test_admin_flag(self):
self.addon.update(admin_review=True)
response = self.client.post(self.url, {'action': 'info',
'comments': 'hello sailor',
'adminflag': True})
eq_(response.status_code, 302)
eq_(Addon.objects.get(pk=self.addon.pk).admin_review, False)