'If the LTI consumer secret is not stored in the database, check Django settings instead'

def get_lti_consumer_secret(self):

    if self.lti_consumer_secret:
        return self.lti_consumer_secret
    return getattr(settings, 'SOCIAL_AUTH_LTI_CONSUMER_SECRETS', {}).get(self.lti_consumer_key, '')
