mirror of
https://github.com/haiwen/seahub.git
synced 2025-04-27 11:01:14 +00:00
Merge pull request #1900 from haiwen/oauth-import
update importing requests_oauthlib
This commit is contained in:
commit
b50144761b
@ -2,7 +2,6 @@
|
||||
|
||||
import os
|
||||
import logging
|
||||
from requests_oauthlib import OAuth2Session
|
||||
from django.http import HttpResponseRedirect
|
||||
from django.template import RequestContext
|
||||
from django.shortcuts import render_to_response
|
||||
@ -19,6 +18,8 @@ logger = logging.getLogger(__name__)
|
||||
ENABLE_OAUTH = getattr(settings, 'ENABLE_OAUTH', False)
|
||||
if ENABLE_OAUTH:
|
||||
|
||||
from requests_oauthlib import OAuth2Session
|
||||
|
||||
if getattr(settings, 'OAUTH_ENABLE_INSECURE_TRANSPORT', False):
|
||||
os.environ['OAUTHLIB_INSECURE_TRANSPORT'] = '1'
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user