forked from gratipay/gratipay.com
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure-aspen.py
31 lines (23 loc) · 1022 Bytes
/
configure-aspen.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import os
import gittip
import gittip.wireup
import gittip.authentication
import gittip.csrf
gittip.wireup.canonical()
gittip.wireup.db()
gittip.wireup.billing()
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.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)
website.hooks.outbound_late.register(gittip.csrf.outbound)
def add_stuff(request):
from gittip.networks import github
request.context['__version__'] = gittip.__version__
request.context['username'] = None
request.context['github'] = github
website.hooks.inbound_early.register(add_stuff)