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