From 9a42ee8bc1b6d182df2db2b1f828cae513066389 Mon Sep 17 00:00:00 2001 From: Tim Watts Date: Sun, 7 Apr 2013 16:32:33 +0000 Subject: [PATCH 1/5] Set API key in settings --- django_balanced/settings.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/django_balanced/settings.py b/django_balanced/settings.py index 290ae47..9985455 100644 --- a/django_balanced/settings.py +++ b/django_balanced/settings.py @@ -3,6 +3,8 @@ from django.conf import settings +import balanced + LOGGER = logging.getLogger(__name__) @@ -37,3 +39,5 @@ if not BALANCED.get('API_KEY'): LOGGER.error('You must set the BALANCED_API_KEY environment variable.') +else: + balanced.configure(BALANCED['API_KEY']) From 894767012580719588b3e2aeb82e9d9d6106f463 Mon Sep 17 00:00:00 2001 From: Tim Watts Date: Sun, 7 Apr 2013 16:33:51 +0000 Subject: [PATCH 2/5] Commented out unneeded balanced.configure in middleware and sync. --- django_balanced/management/commands/sync.py | 2 +- django_balanced/middleware.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/django_balanced/management/commands/sync.py b/django_balanced/management/commands/sync.py index 0b4f183..c16ec71 100644 --- a/django_balanced/management/commands/sync.py +++ b/django_balanced/management/commands/sync.py @@ -12,6 +12,6 @@ class Command(BaseCommand): 'local system' def handle(self, *args, **options): - balanced.configure(settings.BALANCED['API_KEY']) + # balanced.configure(settings.BALANCED['API_KEY']) BankAccount.sync() Credit.sync() diff --git a/django_balanced/middleware.py b/django_balanced/middleware.py index eac0932..772d38d 100644 --- a/django_balanced/middleware.py +++ b/django_balanced/middleware.py @@ -7,4 +7,5 @@ class BalancedMiddleware(object): def process_request(*_): - balanced.configure(settings.BALANCED['API_KEY']) + pass + #balanced.configure(settings.BALANCED['API_KEY']) From 5b246ef3fd3e79161307ae56cfb0683926a1d0ce Mon Sep 17 00:00:00 2001 From: Tim Watts Date: Sun, 7 Apr 2013 16:35:17 +0000 Subject: [PATCH 3/5] rm unneeded middleware, and comment in sync. --- django_balanced/management/commands/sync.py | 1 - 1 file changed, 1 deletion(-) diff --git a/django_balanced/management/commands/sync.py b/django_balanced/management/commands/sync.py index c16ec71..0488d0a 100644 --- a/django_balanced/management/commands/sync.py +++ b/django_balanced/management/commands/sync.py @@ -12,6 +12,5 @@ class Command(BaseCommand): 'local system' def handle(self, *args, **options): - # balanced.configure(settings.BALANCED['API_KEY']) BankAccount.sync() Credit.sync() From ec05a650774bcf8f6ecba0dacc208420b974ad72 Mon Sep 17 00:00:00 2001 From: Tim Watts Date: Wed, 10 Apr 2013 18:59:28 +0000 Subject: [PATCH 4/5] Added contributors files --- CONTRIBUTORS | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 CONTRIBUTORS diff --git a/CONTRIBUTORS b/CONTRIBUTORS new file mode 100644 index 0000000..730ac71 --- /dev/null +++ b/CONTRIBUTORS @@ -0,0 +1,6 @@ +This Django app is brought to you by Balanced. +Marshall Jones (mjallday) + +And a little help from the community +Timothy John Watts (readevalprint) + From 51ea8ee60a19f6cf292481da406dafecf099a2ce Mon Sep 17 00:00:00 2001 From: Tim Watts Date: Sun, 14 Apr 2013 03:02:57 +0000 Subject: [PATCH 5/5] Remove middleware.py --- django_balanced/middleware.py | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 django_balanced/middleware.py diff --git a/django_balanced/middleware.py b/django_balanced/middleware.py deleted file mode 100644 index 772d38d..0000000 --- a/django_balanced/middleware.py +++ /dev/null @@ -1,11 +0,0 @@ -from __future__ import unicode_literals - -import balanced -from django.conf import settings - - -class BalancedMiddleware(object): - - def process_request(*_): - pass - #balanced.configure(settings.BALANCED['API_KEY'])