Browse Source

Rename INI val stripe_api_key to ini_keys.stripe

This will be a bit more organized when I start adding in some other API
keys.
merge-requests/37/head
Deimos 6 years ago
parent
commit
81f53d3f4a
  1. 5
      tildes/production.ini.example
  2. 2
      tildes/tildes/views/donate.py

5
tildes/production.ini.example

@ -20,8 +20,6 @@ redis.sessions.timeout = 3600
sqlalchemy.url = postgresql+psycopg2://tildes:@:6432/tildes
stripe_api_key = sk_live_ActualKeyShouldGoHere
tildes.welcome_message_sender = Deimos
webassets.auto_build = false
@ -30,6 +28,9 @@ webassets.base_url = /
webassets.cache = false
webassets.manifest = json
# API keys for external APIs
api_keys.stripe = sk_live_ActualKeyShouldGoHere
[server:main]
use = egg:gunicorn#main
bind = unix:/run/gunicorn/socket

2
tildes/tildes/views/donate.py

@ -30,7 +30,7 @@ def post_donate_stripe(
) -> dict:
"""Process a Stripe donation."""
try:
stripe.api_key = request.registry.settings["stripe_api_key"]
stripe.api_key = request.registry.settings["api_keys.stripe"]
except KeyError:
raise HTTPInternalServerError

Loading…
Cancel
Save