I guess current_app isn't a function
This commit is contained in:
parent
9cd3d3c59b
commit
e38e1b994d
|
@ -3,7 +3,7 @@ from requests_oauthlib import OAuth1Session
|
||||||
from urllib.parse import urlencode
|
from urllib.parse import urlencode
|
||||||
|
|
||||||
def api_post_request(params):
|
def api_post_request(params):
|
||||||
app = current_app()
|
app = current_app
|
||||||
url = 'https://www.wikidata.org/w/api.php'
|
url = 'https://www.wikidata.org/w/api.php'
|
||||||
client_key = app.config['CLIENT_KEY']
|
client_key = app.config['CLIENT_KEY']
|
||||||
client_secret = app.config['CLIENT_SECRET']
|
client_secret = app.config['CLIENT_SECRET']
|
||||||
|
@ -14,7 +14,7 @@ def api_post_request(params):
|
||||||
return oauth.post(url, data=params, timeout=4)
|
return oauth.post(url, data=params, timeout=4)
|
||||||
|
|
||||||
def api_request(params):
|
def api_request(params):
|
||||||
app = current_app()
|
app = current_app
|
||||||
url = 'https://www.wikidata.org/w/api.php?' + urlencode(params)
|
url = 'https://www.wikidata.org/w/api.php?' + urlencode(params)
|
||||||
client_key = app.config['CLIENT_KEY']
|
client_key = app.config['CLIENT_KEY']
|
||||||
client_secret = app.config['CLIENT_SECRET']
|
client_secret = app.config['CLIENT_SECRET']
|
||||||
|
|
Loading…
Reference in a new issue