sources/oauth(minor): fix wrong settings reference
This commit is contained in:
parent
e70d3b6286
commit
c1dae0b599
|
@ -141,18 +141,6 @@
|
||||||
<span class="list-group-item-value">{% trans 'Audit Log' %}</span>
|
<span class="list-group-item-value">{% trans 'Audit Log' %}</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</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 %}
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
import json
|
import json
|
||||||
from urllib.parse import parse_qs, urlencode
|
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.crypto import constant_time_compare, get_random_string
|
||||||
from django.utils.encoding import force_text
|
from django.utils.encoding import force_text
|
||||||
from requests import Session
|
from requests import Session
|
||||||
|
@ -11,6 +10,8 @@ from requests.exceptions import RequestException
|
||||||
from requests_oauthlib import OAuth1
|
from requests_oauthlib import OAuth1
|
||||||
from structlog import get_logger
|
from structlog import get_logger
|
||||||
|
|
||||||
|
from passbook import __version__
|
||||||
|
|
||||||
LOGGER = get_logger()
|
LOGGER = get_logger()
|
||||||
|
|
||||||
|
|
||||||
|
@ -23,7 +24,7 @@ class BaseOAuthClient:
|
||||||
self.source = source
|
self.source = source
|
||||||
self.token = token
|
self.token = token
|
||||||
self._session = Session()
|
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):
|
def get_access_token(self, request, callback=None):
|
||||||
"Fetch access token from callback request."
|
"Fetch access token from callback request."
|
||||||
|
|
Reference in a new issue