Working for pip and "normal" start for python3 and python2

This commit is contained in:
Ozzieisaacs
2019-06-02 09:33:45 +02:00
parent f5b335e8e9
commit bb0d5c5538
27 changed files with 114 additions and 91 deletions
+5 -4
View File
@@ -20,6 +20,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
__all__ =['app']
import mimetypes
from flask import Flask, request, g
@@ -71,7 +72,7 @@ lm.anonymous_user = ub.Anonymous
ub.init_db()
config = Config()
import db
from . import db
try:
with open(os.path.join(config.get_main_dir, 'cps/translations/iso639.pickle'), 'rb') as f:
@@ -83,10 +84,10 @@ except cPickle.UnpicklingError as error:
searched_ids = {}
from worker import WorkerThread
from .worker import WorkerThread
global_WorkerThread = WorkerThread()
from server import server
from .server import server
Server = server()
babel = Babel()
@@ -142,5 +143,5 @@ def get_timezone():
if user is not None:
return user.timezone
from updater import Updater
from .updater import Updater
updater_thread = Updater()