Files
www.gittip.com/configure-aspen.py
Chad Whitacre 28cb48c72a Big changeover from id to username; #287
I sort of did this one with the blast shield down. I haven't even run
the tests yet. The sorts of things I changed:

 - SQL {elsewhere,exchanges}.participant_id => .participant
 - SQL participants.id => .username
 - ORM {user,participant,self}.id => .username
2013-04-05 15:48:59 -04:00

54 lines
1.9 KiB
Python

import os
import gittip
import gittip.wireup
import gittip.authentication
import gittip.orm
import gittip.csrf
gittip.wireup.canonical()
gittip.wireup.db()
gittip.wireup.billing()
gittip.wireup.username_restrictions(website)
gittip.wireup.sentry(website)
gittip.wireup.mixpanel(website)
website.bitbucket_consumer_key = os.environ['BITBUCKET_CONSUMER_KEY'].decode('ASCII')
website.bitbucket_consumer_secret = os.environ['BITBUCKET_CONSUMER_SECRET'].decode('ASCII')
website.bitbucket_callback = os.environ['BITBUCKET_CALLBACK'].decode('ASCII')
website.github_client_id = os.environ['GITHUB_CLIENT_ID'].decode('ASCII')
website.github_client_secret = os.environ['GITHUB_CLIENT_SECRET'].decode('ASCII')
website.github_callback = os.environ['GITHUB_CALLBACK'].decode('ASCII')
website.twitter_consumer_key = os.environ['TWITTER_CONSUMER_KEY'].decode('ASCII')
website.twitter_consumer_secret = os.environ['TWITTER_CONSUMER_SECRET'].decode('ASCII')
website.twitter_callback = os.environ['TWITTER_CALLBACK'].decode('ASCII')
website.hooks.inbound_early += [ gittip.canonize
, gittip.configure_payments
, gittip.csrf.inbound
, gittip.authentication.inbound
]
website.hooks.outbound += [ gittip.authentication.outbound
, gittip.csrf.outbound
, gittip.orm.rollback
]
__version__ = open(os.path.join(website.www_root, 'version.txt')).read().strip()
os.environ['__VERSION__'] = __version__
def add_stuff(request):
from gittip.elsewhere import bitbucket, github, twitter
request.context['__version__'] = __version__
request.context['username'] = None
request.context['bitbucket'] = bitbucket
request.context['github'] = github
request.context['twitter'] = twitter
website.hooks.inbound_early += [add_stuff]