diff --git a/app/templates/show_author_detail.html b/app/templates/show_author_detail.html
index 2129270..cc0e8b6 100644
--- a/app/templates/show_author_detail.html
+++ b/app/templates/show_author_detail.html
@@ -6,11 +6,15 @@
- Books: {% for book in author.books %}
+
Book(s): {% for book in author.books %}
-
{{ book.title }}
+ {{ book.title }}
{% endfor %}
+
+
+ edit
+
{% endblock %}
diff --git a/app/templates/show_book_detail.html b/app/templates/show_book_detail.html
index 044deee..9ecc64d 100755
--- a/app/templates/show_book_detail.html
+++ b/app/templates/show_book_detail.html
@@ -7,11 +7,11 @@
- Author(s): {% for author in book.authors %}
+
Author(s):
download {{ book.fileformat }}
diff --git a/app/templates/show_books.html b/app/templates/show_books.html
index 3eef110..e7cef45 100755
--- a/app/templates/show_books.html
+++ b/app/templates/show_books.html
@@ -30,7 +30,7 @@
{% for author in book.authors %}
- {{ author.author_name }}
+ {{ author.author_name }}
{% endfor %} |
{{ book.fileformat }} |
diff --git a/app/views.py b/app/views.py
index 1f9f125..e10bd74 100755
--- a/app/views.py
+++ b/app/views.py
@@ -65,6 +65,7 @@ def show_book_by_id(id):
else:
return render_template('show_book_detail.html', book=book)
+
@app.route('/books//delete', methods=['POST', 'GET'])
def remove_book_by_id(id):
book_to_edit = Book.query.filter_by(id=id).first()
@@ -162,14 +163,25 @@ def flash_errors(form):
error
))
+#Authors
+
@app.route('/authors/')
def show_author_by_id(id):
author = Author.query.get(id)
if not author:
- abort(404)
+ abort (404)
else:
return render_template('show_author_detail.html', author=author)
+
+@app.route('/authors//edit', methods=['POST', 'GET'])
+def edit_author_by_id(id):
+ #EDIT AUTHOR TO DO
+ return None
+
+
+
+
###
# The API
###
diff --git a/run.py b/run.py
index 48257b9..9b4e490 100755
--- a/run.py
+++ b/run.py
@@ -1,3 +1,3 @@
#! /usr/bin/env python
from app import app
-app.run(debug=True,host="0.0.0.0",port=8080)
+app.run(debug=True,host="0.0.0.0",port=8000)