From fb54baaf77572c8fd6af8aff37b1cc3506147352 Mon Sep 17 00:00:00 2001 From: kytv <kytv@mail.i2p> Date: Sat, 31 Aug 2013 23:59:03 +0000 Subject: [PATCH] allow system flask-cache/babel to be used --- i2p2www/__init__.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/i2p2www/__init__.py b/i2p2www/__init__.py index 1eb2a93eb..939d9c245 100644 --- a/i2p2www/__init__.py +++ b/i2p2www/__init__.py @@ -1,6 +1,12 @@ from flask import Flask, request, g, redirect, url_for, abort, render_template, send_from_directory, safe_join -from flaskext.babel import Babel -from flask.ext.cache import Cache +try: + from flaskext.babel import Babel +except ImportError: + from flask_babel import Babel +try: + from flask.ext.cache import Cache +except ImportError: + from flask_cache import Cache from docutils.core import publish_parts import os.path import os -- GitLab