|
@ -1,4 +1,4 @@ |
|
|
"""This is the main flask page code""" |
|
|
"""This is the main flask library page""" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import flask |
|
|
import flask |
|
@ -11,8 +11,7 @@ APP = flask.Flask(__name__, static_folder="static") |
|
|
|
|
|
|
|
|
@APP.route("/") |
|
|
@APP.route("/") |
|
|
def index(): |
|
|
def index(): |
|
|
"""Main route""" |
|
|
"""Main route, shows all the books and you can filter them, a bit""" |
|
|
# parse csv, render template with a few elements from the csv |
|
|
|
|
|
pubtypes = gettypes() |
|
|
pubtypes = gettypes() |
|
|
pubyears = getyears() |
|
|
pubyears = getyears() |
|
|
publicatons = getpublications() |
|
|
publicatons = getpublications() |
|
@ -27,15 +26,14 @@ def index(): |
|
|
|
|
|
|
|
|
@APP.route("/<publicationID>") |
|
|
@APP.route("/<publicationID>") |
|
|
def show_book(publicationID): |
|
|
def show_book(publicationID): |
|
|
"""route for a publication""" |
|
|
"""route for a publication, still needs to be made""" |
|
|
# parse csv, render template with full list. |
|
|
# parse csv, render template with full list. |
|
|
return render_template("publication.html") |
|
|
return render_template("publication.html") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@APP.route("/<publication>") |
|
|
@APP.route("/<publication>") |
|
|
def upload_book(publication): |
|
|
def upload_book(publication): |
|
|
"""upload a new book""" |
|
|
"""upload a new book, still needs to be made""" |
|
|
# |
|
|
|
|
|
return render_template("upload.html") |
|
|
return render_template("upload.html") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|