diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c18dd8d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +__pycache__/ diff --git a/__pycache__/author.cpython-38.pyc b/__pycache__/author.cpython-38.pyc deleted file mode 100644 index ae55ffd..0000000 Binary files a/__pycache__/author.cpython-38.pyc and /dev/null differ diff --git a/__pycache__/authorroutes.cpython-38.pyc b/__pycache__/authorroutes.cpython-38.pyc deleted file mode 100644 index 0523e9d..0000000 Binary files a/__pycache__/authorroutes.cpython-38.pyc and /dev/null differ diff --git a/__pycache__/book.cpython-38.pyc b/__pycache__/book.cpython-38.pyc deleted file mode 100644 index 6bdc13a..0000000 Binary files a/__pycache__/book.cpython-38.pyc and /dev/null differ diff --git a/__pycache__/db.cpython-38.pyc b/__pycache__/db.cpython-38.pyc deleted file mode 100644 index b0cc632..0000000 Binary files a/__pycache__/db.cpython-38.pyc and /dev/null differ diff --git a/__pycache__/db_model.cpython-38.pyc b/__pycache__/db_model.cpython-38.pyc deleted file mode 100644 index 6d3fe00..0000000 Binary files a/__pycache__/db_model.cpython-38.pyc and /dev/null differ diff --git a/author.py b/author.py new file mode 100644 index 0000000..c58416a --- /dev/null +++ b/author.py @@ -0,0 +1,8 @@ +from wtforms import SubmitField, StringField, HiddenField, validators, Form + +class AuthorForm(Form): + id = HiddenField() + firstnames = StringField('FirstName(s):', [validators.DataRequired()]) + surname = StringField('Surname:', [validators.DataRequired()]) + submit = SubmitField('Save' ) + diff --git a/templates/authors.html b/templates/authors.html new file mode 100644 index 0000000..0dbdf16 --- /dev/null +++ b/templates/authors.html @@ -0,0 +1,9 @@ + +
+ +{{author.surname}}, {{author.firstnames}}
+ {% endfor %} + +