diff --git a/app/__init__.py b/app/__init__.py index b2dc543..fecc4ff 100755 --- a/app/__init__.py +++ b/app/__init__.py @@ -8,7 +8,7 @@ import os import click from werkzeug.utils import secure_filename from sqlalchemy.dialects import registry -import flask_whooshalchemyplus +# import flask_whooshalchemyplus not using whoosh anymore registry.register("rqlite.pyrqlite", "sqlalchemy_rqlite.pyrqlite", "dialect") @@ -27,9 +27,6 @@ app.config['SQLALCHEMY_DATABASE_URI'] = 'rqlite+pyrqlite://localhost:4001/' app.config['DEBUG'] = True app.config['PORT'] = 80 -# set the location for the whoosh index -app.config['WHOOSH_BASE'] = 'whoosh' - #app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///' + os.path.join(basedir, 'mydatabase.db') db = SQLAlchemy(app) @@ -39,5 +36,7 @@ socketio = SocketIO(app) app.config.from_object(__name__) from app import views -flask_whooshalchemyplus.init_app(app) # initialize +# set the location for the whoosh index +# app.config['WHOOSH_BASE'] = 'whoosh' +# flask_whooshalchemyplus.init_app(app) # initialize diff --git a/app/forms.py b/app/forms.py index e276a3d..0e5e25f 100755 --- a/app/forms.py +++ b/app/forms.py @@ -46,6 +46,9 @@ class EditStackForm(FlaskForm): class SearchForm(FlaskForm): choices = [('All', 'All'), ('Title', 'Title'), - ('Category', 'Category')] + ('Author', 'Author'), + ('Category', 'Category'), + ('Stack', 'Stack')] select = SelectField('', choices=choices) search = StringField('', validators=[InputRequired()]) + diff --git a/app/models.py b/app/models.py index d2361e5..80868ec 100755 --- a/app/models.py +++ b/app/models.py @@ -17,7 +17,6 @@ stacks = db.Table('books_stacks', class Book(db.Model): __tablename__ = 'books' - __searchable__ = ['title', 'category', 'fileformat'] # these fields will be indexed by whoosh id = db.Column(db.Integer, primary_key = True) title = db.Column(db.String(255)) diff --git a/app/static/css/style.css b/app/static/css/style.css index be7e00f..a39c5b2 100755 --- a/app/static/css/style.css +++ b/app/static/css/style.css @@ -1,15 +1,4 @@ @import url("../fonts/fonts_style.css"); -/* -Font-names: -junicoderegular -junicoderegularcondensed -junicodeitalic -junicodeitaliccondensed -junicodebold -junicodeboldcondensed -junicodebolditalic -junicodebolditaliccondensed -*/ *{ font-family: "Archivo Narrow"; @@ -121,7 +110,7 @@ cursor: pointer; .header input{ height:40px; width: 500px; -font-size: 30px; +font-size: 24px; font-weight: bold; } @@ -136,10 +125,10 @@ margin: 0; float: left; width: 320px; height: 36px; -font-size: 20px; +font-size: 18px; font-weight: regular; padding: 2px; -background:rgba(50, 50, 50, 0.2); +background:rgb(240, 240, 240); border:0px; box-shadow: inset 0 0 5px rgba(000,000,000, 0.2); } @@ -200,7 +189,7 @@ font-size: 12px; top:0; left:0; position: fixed; - font-size: 20px; + font-size: 18px; background-color: yellow; } diff --git a/app/templates/results.html b/app/templates/results.html index aa1acf7..1ee29ef 100644 --- a/app/templates/results.html +++ b/app/templates/results.html @@ -3,16 +3,21 @@ {% block main %}
diff --git a/app/templates/show_books.html b/app/templates/show_books.html index 101ce54..5f8e7b9 100755 --- a/app/templates/show_books.html +++ b/app/templates/show_books.html @@ -7,7 +7,7 @@