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

Oauth is optional again
pull/829/head
Ozzieisaacs 6 years ago
commit eef4787b79

@ -36,7 +36,11 @@ from cps.shelf import shelf
from cps.admin import admi
from cps.gdrive import gdrive
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__':
@ -49,7 +53,8 @@ if __name__ == '__main__':
app.register_blueprint(admi)
app.register_blueprint(gdrive)
app.register_blueprint(editbook)
app.register_blueprint(oauth)
if oauth_available:
app.register_blueprint(oauth)
Server.startServer()

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

@ -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 Blueprint
import datetime
import db
from cps import db
import os
import json
from flask_babel import gettext as _

@ -19,13 +19,12 @@
# 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 tempfile import gettempdir
import sys
import os
import re
import db
import unicodedata
import worker
import time

@ -22,12 +22,11 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# 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 pagination import Pagination
from flask import Blueprint
import datetime
import db
import ub
from flask_login import current_user
from functools import wraps

@ -22,13 +22,11 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
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 sqlalchemy.sql.expression import func, or_
from flask_login import login_required, current_user
from web import render_title_template
from cps import app
import db
shelf = Blueprint('shelf', __name__)

@ -40,10 +40,9 @@ import json
import datetime
from iso639 import languages as isoLanguages
import re
import db
import gdriveutils
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 sqlalchemy.sql.expression import text

Loading…
Cancel
Save