Commit 3f3419f3 authored by KaoruSawade's avatar KaoruSawade

Created forms.py and implemented AuthorForm and BooksForm

parent dd9964ea
from django import forms
from .models import Author, Books
class AuthorForm(forms.ModelForm):
class Meta:
model = Author
fields = ['first_name', 'last_name', 'age', 'nationality', 'bio']
class BooksForm(forms.ModelForm):
class Meta:
model = Books
fields = ['title', 'author', 'publisher', 'year_published', 'ISBN', 'blurb']
\ No newline at end of file
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