From c1dae0b5991a30d970b1f3327c24f9290489e434 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Wed, 9 Oct 2019 19:46:23 +0200 Subject: [PATCH] sources/oauth(minor): fix wrong settings reference --- passbook/core/templates/overview/base.html | 12 ------------ passbook/sources/oauth/clients.py | 5 +++-- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/passbook/core/templates/overview/base.html b/passbook/core/templates/overview/base.html index 5b80a7f3f..04982586d 100644 --- a/passbook/core/templates/overview/base.html +++ b/passbook/core/templates/overview/base.html @@ -141,18 +141,6 @@ {% trans 'Audit Log' %} -
  • - - - {% trans 'Django' %} - -
  • -
  • - - - {% trans 'Debug' %} - -
  • {% endif %} diff --git a/passbook/sources/oauth/clients.py b/passbook/sources/oauth/clients.py index cbbdb57ae..01e15b5c4 100644 --- a/passbook/sources/oauth/clients.py +++ b/passbook/sources/oauth/clients.py @@ -3,7 +3,6 @@ import json from urllib.parse import parse_qs, urlencode -from django.conf import settings from django.utils.crypto import constant_time_compare, get_random_string from django.utils.encoding import force_text from requests import Session @@ -11,6 +10,8 @@ from requests.exceptions import RequestException from requests_oauthlib import OAuth1 from structlog import get_logger +from passbook import __version__ + LOGGER = get_logger() @@ -23,7 +24,7 @@ class BaseOAuthClient: self.source = source self.token = token self._session = Session() - self._session.headers.update({'User-Agent': 'web:passbook:%s' % settings.VERSION}) + self._session.headers.update({'User-Agent': 'web:passbook:%s' % __version__}) def get_access_token(self, request, callback=None): "Fetch access token from callback request."