Merge remote-tracking branch 'github/patch-1' into Develop

Oauth is optional again
This commit is contained in:
Ozzieisaacs 2019-02-24 19:34:57 +01:00
commit eef4787b79
7 changed files with 13 additions and 13 deletions

7
cps.py
View File

@ -36,7 +36,11 @@ from cps.shelf import shelf
from cps.admin import admi from cps.admin import admi
from cps.gdrive import gdrive from cps.gdrive import gdrive
from cps.editbooks import editbook from cps.editbooks import editbook
from cps.oauth_bb import oauth try:
from cps.oauth_bb import oauth
oauth_available = True
except ImportError:
oauth_available = False
if __name__ == '__main__': if __name__ == '__main__':
@ -49,6 +53,7 @@ if __name__ == '__main__':
app.register_blueprint(admi) app.register_blueprint(admi)
app.register_blueprint(gdrive) app.register_blueprint(gdrive)
app.register_blueprint(editbook) app.register_blueprint(editbook)
if oauth_available:
app.register_blueprint(oauth) app.register_blueprint(oauth)
Server.startServer() Server.startServer()

View File

@ -23,7 +23,7 @@
from flask import Blueprint from flask import Blueprint
from flask_login import login_required from flask_login import login_required
import db from cps import db
import sys import sys
import uploader import uploader
from babel import __version__ as babelVersion from babel import __version__ as babelVersion

View File

@ -26,7 +26,7 @@ from cps import config, language_table, get_locale, app, ub, global_WorkerThread
from flask import request, flash, redirect, url_for, abort, Markup, Response from flask import request, flash, redirect, url_for, abort, Markup, Response
from flask import Blueprint from flask import Blueprint
import datetime import datetime
import db from cps import db
import os import os
import json import json
from flask_babel import gettext as _ from flask_babel import gettext as _

View File

@ -19,13 +19,12 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
from cps import config, global_WorkerThread, get_locale from cps import config, global_WorkerThread, get_locale, db
from flask import current_app as app from flask import current_app as app
from tempfile import gettempdir from tempfile import gettempdir
import sys import sys
import os import os
import re import re
import db
import unicodedata import unicodedata
import worker import worker
import time import time

View File

@ -22,12 +22,11 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
# opds routing functions # opds routing functions
from cps import config, mimetypes, app from cps import config, mimetypes, app, db
from flask import request, render_template, Response, g, make_response from flask import request, render_template, Response, g, make_response
from pagination import Pagination from pagination import Pagination
from flask import Blueprint from flask import Blueprint
import datetime import datetime
import db
import ub import ub
from flask_login import current_user from flask_login import current_user
from functools import wraps from functools import wraps

View File

@ -22,13 +22,11 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
from flask import Blueprint, request, flash, redirect, url_for from flask import Blueprint, request, flash, redirect, url_for
from cps import ub, searched_ids from cps import ub, searched_ids, app, db
from flask_babel import gettext as _ from flask_babel import gettext as _
from sqlalchemy.sql.expression import func, or_ from sqlalchemy.sql.expression import func, or_
from flask_login import login_required, current_user from flask_login import login_required, current_user
from web import render_title_template from web import render_title_template
from cps import app
import db
shelf = Blueprint('shelf', __name__) shelf = Blueprint('shelf', __name__)

View File

@ -40,10 +40,9 @@ import json
import datetime import datetime
from iso639 import languages as isoLanguages from iso639 import languages as isoLanguages
import re import re
import db
import gdriveutils import gdriveutils
from redirect import redirect_back from redirect import redirect_back
from cps import lm, babel, ub, config, get_locale, language_table, app from cps import lm, babel, ub, config, get_locale, language_table, app, db
from pagination import Pagination from pagination import Pagination
from sqlalchemy.sql.expression import text from sqlalchemy.sql.expression import text