Commit ffbf4449 authored by justin's avatar justin

feat: added form routing in html templates, form for adding books boilerplate

parent d83f6a10
from django import forms
class BookForm(forms.Form):
title = forms.CharField(label="Title", max_length=255)
publisher = forms.CharField(label="Publisher", max_length=255)
year_published = forms.IntegerField(label="Year Published")
isbn = forms.IntegerField(label="ISBN")
blurb = forms.CharField(label="Blurb", widget=forms.Textarea)
...@@ -10,6 +10,8 @@ ...@@ -10,6 +10,8 @@
<ul class="footer"> <ul class="footer">
<li><a href="/books">Books</a></li> <li><a href="/books">Books</a></li>
<li><a href="/books/add">Add Book</a></li>
<li><a href="/authors">Authors</a></li> <li><a href="/authors">Authors</a></li>
<li><a href="/authors/add">Add Author</a></li>
</ul> </ul>
{% endblock %} {% endblock %}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment