created and added the Book model

parent 1d23d209
......@@ -10,3 +10,12 @@ class Author(models.Model):
nationality = models.CharField(max_length = 50)
bio = models.CharField(max_length = 700)
class Book(models.Model):
title = models.CharField(max_length = 100)
author = models.ForeignKey(Author, on_delete = models.CASCADE)
publisher = models.CharField(max_length = 50)
year_published = models.DateField(auto_now_add=True)
ISBN = models.BigIntegerField(default = 0)
blurb = models.TextField(max_length = 800)
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