[IMP] Added warning message for oauth lib for REST
[ADD] Added lib in requirements.txt
This commit is contained in:
parent
487ed76bc1
commit
9ca2b698d3
@ -2,14 +2,21 @@
|
|||||||
# Author: Ivan Yelizariev, Ildar
|
# Author: Ivan Yelizariev, Ildar
|
||||||
# Ref. from: https://github.com/it-projects-llc/odoo-saas-tools/blob/10.0/oauth_provider/models/oauth_provider.py
|
# Ref. from: https://github.com/it-projects-llc/odoo-saas-tools/blob/10.0/oauth_provider/models/oauth_provider.py
|
||||||
|
|
||||||
|
import logging
|
||||||
|
|
||||||
from flectra import models, fields, api
|
from flectra import models, fields, api
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
from flectra.tools import DEFAULT_SERVER_DATETIME_FORMAT
|
from flectra.tools import DEFAULT_SERVER_DATETIME_FORMAT
|
||||||
|
|
||||||
|
_logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from oauthlib import common as oauthlib_common
|
from oauthlib import common as oauthlib_common
|
||||||
except:
|
except ImportError:
|
||||||
pass
|
_logger.warning(
|
||||||
|
'OAuth library not found. If you plan to use it, '
|
||||||
|
'please install the oauth library from '
|
||||||
|
'https://pypi.python.org/pypi/oauthlib')
|
||||||
|
|
||||||
|
|
||||||
class OauthAccessToken(models.Model):
|
class OauthAccessToken(models.Model):
|
||||||
|
@ -13,6 +13,7 @@ Mako==1.0.4
|
|||||||
MarkupSafe==0.23
|
MarkupSafe==0.23
|
||||||
mock==2.0.0
|
mock==2.0.0
|
||||||
num2words==0.5.4
|
num2words==0.5.4
|
||||||
|
oauthlib==2.0.7
|
||||||
ofxparse==0.16
|
ofxparse==0.16
|
||||||
passlib==1.6.5
|
passlib==1.6.5
|
||||||
phonenumbers==8.8.9
|
phonenumbers==8.8.9
|
||||||
|
Loading…
Reference in New Issue
Block a user