aboutsummaryrefslogtreecommitdiff
path: root/runserver.py
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2020-03-10 22:29:19 +0100
committerCédric Bonhomme <cedric@cedricbonhomme.org>2020-03-10 22:29:19 +0100
commit7a08a6b548e39a477aaf49b6213a2e06a0f3498a (patch)
tree775895d433100fbbe0efdb6759a2b14e5a999d30 /runserver.py
parentremoved unused variable (diff)
downloadnewspipe-7a08a6b548e39a477aaf49b6213a2e06a0f3498a.tar.gz
newspipe-7a08a6b548e39a477aaf49b6213a2e06a0f3498a.tar.bz2
newspipe-7a08a6b548e39a477aaf49b6213a2e06a0f3498a.zip
cleaned imports
Diffstat (limited to 'runserver.py')
-rwxr-xr-xrunserver.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/runserver.py b/runserver.py
index 0afdc3ed..603038dc 100755
--- a/runserver.py
+++ b/runserver.py
@@ -19,9 +19,13 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import calendar
-from newspipe.bootstrap import application
+
+from flask import g
from flask_babel import Babel, format_datetime
+# Views
+from flask_restful import Api
+from newspipe.bootstrap import application
babel = Babel(application)
@@ -36,9 +40,6 @@ application.jinja_env.filters["datetime"] = format_datetime
# inject application in Jinja env
application.jinja_env.globals["application"] = application
-# Views
-from flask_restful import Api
-from flask import g
with application.app_context():
g.api = Api(application, prefix="/api/v2.0")
bgstack15