|
|
@ -37,6 +37,7 @@ def index(): |
|
|
|
publicatons = csvparser.getpublications() |
|
|
|
template = render_template( |
|
|
|
"index.html", |
|
|
|
title=APP.config["TITLE"], |
|
|
|
publications=publicatons, |
|
|
|
pubtypes=pubtypes, |
|
|
|
pubyears=pubyears, |
|
|
@ -49,7 +50,7 @@ def index(): |
|
|
|
def upload(): |
|
|
|
"""Upload route, a page to upload a book to the csv""" |
|
|
|
uploadform = PublicationForm() |
|
|
|
csvparser = CsvParser(APP.config["libaryfilename"], APP.config[""]) |
|
|
|
csvparser = CsvParser(APP.config["LIBRARY_FILENAME"], APP.config["IMAGE_FOLDER"]) |
|
|
|
if request.method == "POST": |
|
|
|
if uploadform.validate_on_submit() and checksecret( |
|
|
|
uploadform.secret.data |
|
|
@ -59,7 +60,7 @@ def upload(): |
|
|
|
return redirect(str(id), code=303) |
|
|
|
else: |
|
|
|
return render_template("upload.html", uploadform=uploadform) |
|
|
|
return render_template("upload.html", uploadform=uploadform) |
|
|
|
return render_template("upload.html", title=APP.config["TITLE"], uploadform=uploadform) |
|
|
|
|
|
|
|
|
|
|
|
@APP.route("/<publicationID>", methods=["GET", "POST"]) |
|
|
|