mattupstate/flask-social — pull request #13 by joeyespo (2013-08-21 21:30:14+00:00)
Title: Allow SOCIAL_<PROVIDER> settings to be None

With this, you can be explicit about what settings are expected
in your root settings.py file. SOCIAL_FACEBOOK can be None, for
example, and overridden in another file or in the environment.

Here's my personal setup:

SOCIAL_TWITTER = {
'consumer_key': os.environ.get('TWITTER_CONSUMER_KEY'),
'consumer_secret': os.environ.get('TWITTER_CONSUMER_SECRET'),
} if os.environ.get('TWITTER_CONSUMER_KEY') else None

It would be ideal if 'consumer_key' could allow None, but I didn't want
to break the OAuth mechanism in this commit, so this is good enough.