sources/oauth(minor): fix wrong settings reference

This commit is contained in:
Jens Langhammer 2019-10-09 19:46:23 +02:00
parent e70d3b6286
commit c1dae0b599
2 changed files with 3 additions and 14 deletions

View File

@ -141,18 +141,6 @@
<span class="list-group-item-value">{% trans 'Audit Log' %}</span>
</a>
</li>
<li class="list-group-item {% is_active_app 'admin' %}">
<a href="{% url 'admin:index' %}">
<span class="fa fa-database" data-toggle="tooltip" title="{% trans 'Django' %}"></span>
<span class="list-group-item-value">{% trans 'Django' %}</span>
</a>
</li>
<li class="list-group-item {% is_active 'passbook_admin:debug-request' %}">
<a href="{% url 'passbook_admin:debug-request' %}">
<span class="fa fa-bug" data-toggle="tooltip" title="{% trans 'Debug' %}"></span>
<span class="list-group-item-value">{% trans 'Debug' %}</span>
</a>
</li>
{% endif %}
</ul>
</div>

View File

@ -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."