Least change to adapt with python3
change some syntax - except clause - unicode -> bulitins.str - sqllite uri - fix import local path - 01 to 1 (0 is meaningless) add module - future - builtins (from future) - imp (python3 ) - past (from future) - sqlalchemy (update one) refer to http://python-future.org/compatible_idioms.html
This commit is contained in:
@@ -10,6 +10,7 @@ import os
|
||||
import logging
|
||||
from werkzeug.security import generate_password_hash
|
||||
from flask_babel import gettext as _
|
||||
from builtins import str
|
||||
|
||||
dbpath = os.path.join(os.path.normpath(os.path.dirname(os.path.realpath(__file__)) + os.sep + ".." + os.sep), "app.db")
|
||||
engine = create_engine('sqlite:///{0}'.format(dbpath), echo=False)
|
||||
@@ -90,7 +91,7 @@ class UserBase:
|
||||
return False
|
||||
|
||||
def get_id(self):
|
||||
return unicode(self.id)
|
||||
return str(self.id)
|
||||
|
||||
def filter_language(self):
|
||||
return self.default_language
|
||||
|
||||
Reference in New Issue
Block a user