Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

Commit

Permalink
Bring back necessary balance config w/ comment #78
Browse files Browse the repository at this point in the history
  • Loading branch information
chadwhitacre committed Jul 18, 2012
1 parent 4f4bb01 commit 3abd652
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions configure-aspen.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
website.github_callback = os.environ['GITHUB_CALLBACK'].decode('ASCII')

website.hooks.inbound_early.register(gittip.canonize)
website.hooks.inbound_early.register(gittip.configure_payments)
website.hooks.inbound_early.register(gittip.csrf.inbound)
website.hooks.inbound_early.register(gittip.authentication.inbound)
website.hooks.outbound_late.register(gittip.authentication.outbound)
Expand Down
8 changes: 8 additions & 0 deletions gittip/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import datetime
import locale
import os
from decimal import Decimal

import balanced


try: # XXX This can't be right.
locale.setlocale(locale.LC_ALL, "en_US.utf8")
Expand Down Expand Up @@ -232,3 +235,8 @@ def canonize(request):
# For non-idempotent methods, redirect to homepage.
url += '/'
request.redirect(url, permanent=True)


def configure_payments(request):
# Work-around for https://github.com/balanced/balanced-python/issues/5
balanced.configure(os.environ['BALANCED_API_SECRET'])

0 comments on commit 3abd652

Please sign in to comment.