prefer the paradigm:

getattr(settings, 'THE_KEY', <somedefault>)