aboutsummaryrefslogtreecommitdiff
path: root/src/web/views/api
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2016-05-29 22:58:20 +0200
committerCédric Bonhomme <cedric@cedricbonhomme.org>2016-05-29 22:58:20 +0200
commitb0049442eee94a1636490c091215bd706f819558 (patch)
treee44b18eddfcc0134ed4fc2b38821740617fac694 /src/web/views/api
parentBugfix: it was not possible to delete a user with categories. (diff)
downloadnewspipe-b0049442eee94a1636490c091215bd706f819558.tar.gz
newspipe-b0049442eee94a1636490c091215bd706f819558.tar.bz2
newspipe-b0049442eee94a1636490c091215bd706f819558.zip
Fixed some depreciations with the new version of Flask.
Diffstat (limited to 'src/web/views/api')
-rw-r--r--src/web/views/api/v2/article.py2
-rw-r--r--src/web/views/api/v2/category.py2
-rw-r--r--src/web/views/api/v2/common.py4
-rw-r--r--src/web/views/api/v2/feed.py2
-rw-r--r--src/web/views/api/v3/article.py4
-rw-r--r--src/web/views/api/v3/common.py4
-rw-r--r--src/web/views/api/v3/feed.py2
7 files changed, 10 insertions, 10 deletions
diff --git a/src/web/views/api/v2/article.py b/src/web/views/api/v2/article.py
index 71201538..2be286c6 100644
--- a/src/web/views/api/v2/article.py
+++ b/src/web/views/api/v2/article.py
@@ -2,7 +2,7 @@ from conf import API_ROOT
import dateutil.parser
from datetime import datetime
from flask import current_app
-from flask.ext.restful import Api
+from flask_restful import Api
from web.views.common import api_permission
from web.controllers import ArticleController
diff --git a/src/web/views/api/v2/category.py b/src/web/views/api/v2/category.py
index 21459fc5..70fda1ea 100644
--- a/src/web/views/api/v2/category.py
+++ b/src/web/views/api/v2/category.py
@@ -1,6 +1,6 @@
from conf import API_ROOT
from flask import current_app
-from flask.ext.restful import Api
+from flask_restful import Api
from web.controllers.category import CategoryController
from web.views.api.v2.common import (PyAggResourceNew,
diff --git a/src/web/views/api/v2/common.py b/src/web/views/api/v2/common.py
index 0227d6cf..04b19d78 100644
--- a/src/web/views/api/v2/common.py
+++ b/src/web/views/api/v2/common.py
@@ -23,8 +23,8 @@ import logging
from functools import wraps
from werkzeug.exceptions import Unauthorized, BadRequest, Forbidden, NotFound
from flask import request
-from flask.ext.restful import Resource, reqparse
-from flask.ext.login import current_user
+from flask_restful import Resource, reqparse
+from flask_login import current_user
from web.views.common import admin_permission, api_permission, \
login_user_bundle, jsonify
diff --git a/src/web/views/api/v2/feed.py b/src/web/views/api/v2/feed.py
index 686dcd76..a5561475 100644
--- a/src/web/views/api/v2/feed.py
+++ b/src/web/views/api/v2/feed.py
@@ -1,6 +1,6 @@
from conf import API_ROOT
from flask import current_app
-from flask.ext.restful import Api
+from flask_restful import Api
from web.views.common import api_permission
from web.controllers.feed import (FeedController,
diff --git a/src/web/views/api/v3/article.py b/src/web/views/api/v3/article.py
index 4f9bbb8b..9a4df1ce 100644
--- a/src/web/views/api/v3/article.py
+++ b/src/web/views/api/v3/article.py
@@ -26,9 +26,9 @@ __revision__ = "$Date: 2016/04/29 $"
__copyright__ = "Copyright (c) Cedric Bonhomme"
__license__ = "GPLv3"
-from flask.ext.login import current_user
+from flask_login import current_user
from werkzeug.exceptions import NotFound
-from flask.ext.restless import ProcessingException
+from flask_restless import ProcessingException
from web import models
from bootstrap import application, manager
from web.controllers import ArticleController, FeedController
diff --git a/src/web/views/api/v3/common.py b/src/web/views/api/v3/common.py
index 05ce7057..84e3da0d 100644
--- a/src/web/views/api/v3/common.py
+++ b/src/web/views/api/v3/common.py
@@ -27,8 +27,8 @@ __copyright__ = "Copyright (c) Cedric Bonhomme"
__license__ = "GPLv3"
from flask import request
-from flask.ext.login import current_user
-from flask.ext.restless import ProcessingException
+from flask_login import current_user
+from flask_restless import ProcessingException
from werkzeug.exceptions import NotFound
from web.controllers import ArticleController, UserController
from web.views.common import login_user_bundle
diff --git a/src/web/views/api/v3/feed.py b/src/web/views/api/v3/feed.py
index 1c32929f..cc9f5cad 100644
--- a/src/web/views/api/v3/feed.py
+++ b/src/web/views/api/v3/feed.py
@@ -26,7 +26,7 @@ __revision__ = "$Date: 2016/04/29 $"
__copyright__ = "Copyright (c) Cedric Bonhomme"
__license__ = "GPLv3"
-from flask.ext.login import current_user
+from flask_login import current_user
from web import models
from bootstrap import application, manager
from web.controllers import FeedController
bgstack15