aboutsummaryrefslogtreecommitdiff
path: root/src/web/views
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2016-11-17 08:30:06 +0100
committerCédric Bonhomme <cedric@cedricbonhomme.org>2016-11-17 08:30:06 +0100
commitb0e987fbafaa28226c54157fb11993079c5341e2 (patch)
tree1f0cd04a505dce4680155f8bb4c7bb757984c030 /src/web/views
parentBugfix: should import Article in order to resolve the 'date' column for the o... (diff)
downloadnewspipe-b0e987fbafaa28226c54157fb11993079c5341e2.tar.gz
newspipe-b0e987fbafaa28226c54157fb11993079c5341e2.tar.bz2
newspipe-b0e987fbafaa28226c54157fb11993079c5341e2.zip
cleaning the mess in the libs directories
Diffstat (limited to 'src/web/views')
-rw-r--r--src/web/views/admin.py2
-rw-r--r--src/web/views/article.py4
-rw-r--r--src/web/views/category.py2
-rw-r--r--src/web/views/common.py2
-rw-r--r--src/web/views/feed.py4
-rw-r--r--src/web/views/home.py4
-rw-r--r--src/web/views/user.py7
7 files changed, 13 insertions, 12 deletions
diff --git a/src/web/views/admin.py b/src/web/views/admin.py
index a9e1e43d..4de4009a 100644
--- a/src/web/views/admin.py
+++ b/src/web/views/admin.py
@@ -4,8 +4,8 @@ from flask_babel import gettext, format_timedelta
from flask_login import login_required, current_user
from werkzeug import generate_password_hash
+from lib.utils import redirect_url
from web.views.common import admin_permission
-from web.lib.utils import redirect_url
from web.controllers import UserController
from web.forms import InformationMessageForm, UserForm
diff --git a/src/web/views/article.py b/src/web/views/article.py
index 283ef001..640de8b4 100644
--- a/src/web/views/article.py
+++ b/src/web/views/article.py
@@ -7,8 +7,8 @@ from flask_login import login_required, current_user
from bootstrap import db
-from web.export import export_json
-from web.lib.utils import clear_string, redirect_url
+from lib.utils import clear_string, redirect_url
+from lib.data import export_json
from web.controllers import (ArticleController, UserController,
CategoryController)
from web.lib.view_utils import etag_match
diff --git a/src/web/views/category.py b/src/web/views/category.py
index 1a81a5c4..2bdcf9cc 100644
--- a/src/web/views/category.py
+++ b/src/web/views/category.py
@@ -3,7 +3,7 @@ from flask_babel import gettext
from flask_login import login_required, current_user
from web.forms import CategoryForm
-from web.lib.utils import redirect_url
+from lib.utils import redirect_url
from web.lib.view_utils import etag_match
from web.controllers import ArticleController, FeedController, \
CategoryController
diff --git a/src/web/views/common.py b/src/web/views/common.py
index f9613c01..e422fd57 100644
--- a/src/web/views/common.py
+++ b/src/web/views/common.py
@@ -6,7 +6,7 @@ from flask_login import login_user
from flask_principal import (Identity, Permission, RoleNeed,
session_identity_loader, identity_changed)
from web.controllers import UserController
-from web.lib.utils import default_handler
+from lib.utils import default_handler
admin_role = RoleNeed('admin')
api_role = RoleNeed('api')
diff --git a/src/web/views/feed.py b/src/web/views/feed.py
index 3edb942e..fa5cfc77 100644
--- a/src/web/views/feed.py
+++ b/src/web/views/feed.py
@@ -10,9 +10,9 @@ from flask_babel import gettext
from flask_login import login_required, current_user
import conf
-from web.lib import misc_utils, utils
+from lib import misc_utils, utils
+from lib.feed_utils import construct_feed_from
from web.lib.view_utils import etag_match
-from web.lib.feed_utils import construct_feed_from
from web.forms import AddFeedForm
from web.controllers import (CategoryController, FeedController,
ArticleController)
diff --git a/src/web/views/home.py b/src/web/views/home.py
index 179f3f9d..5274dc12 100644
--- a/src/web/views/home.py
+++ b/src/web/views/home.py
@@ -9,8 +9,8 @@ from flask_babel import gettext, get_locale
from babel.dates import format_datetime, format_timedelta
import conf
-from web.lib.utils import redirect_url
-from web.lib import misc_utils
+from lib.utils import redirect_url
+from lib import misc_utils
from web.lib.view_utils import etag_match
from web.views.common import jsonify
diff --git a/src/web/views/user.py b/src/web/views/user.py
index 91cf7e4a..58c23dd2 100644
--- a/src/web/views/user.py
+++ b/src/web/views/user.py
@@ -8,7 +8,8 @@ from flask_login import login_required, current_user
import conf
from notifications import notifications
-from web.lib import misc_utils
+from lib import misc_utils
+from lib.data import import_opml, import_json
from web.lib.user_utils import confirm_token
from web.controllers import (UserController, FeedController, ArticleController,
CategoryController)
@@ -59,7 +60,7 @@ def management():
flash(gettext('File not allowed.'), 'danger')
else:
try:
- nb = misc_utils.import_opml(current_user.email, data.read())
+ nb = import_opml(current_user.email, data.read())
if conf.CRAWLING_METHOD == "classic":
misc_utils.fetch(current_user.email, None)
flash(str(nb) + ' ' + gettext('feeds imported.'),
@@ -75,7 +76,7 @@ def management():
flash(gettext('File not allowed.'), 'danger')
else:
try:
- nb = misc_utils.import_json(current_user.email, data.read())
+ nb = import_json(current_user.email, data.read())
flash(gettext('Account imported.'), "success")
except:
flash(gettext("Impossible to import the account."),
bgstack15