edited the Field type of year_published and bio

parent 1e195517
...@@ -8,7 +8,7 @@ class Author(models.Model): ...@@ -8,7 +8,7 @@ class Author(models.Model):
last_name = models.CharField(max_length = 50) last_name = models.CharField(max_length = 50)
age = models.IntegerField(default = 0) age = models.IntegerField(default = 0)
nationality = models.CharField(max_length = 50) nationality = models.CharField(max_length = 50)
bio = models.CharField(max_length = 700) bio = models.TextField(max_length = 700)
def __str__(self): def __str__(self):
return self.first_name + " " + self.last_name return self.first_name + " " + self.last_name
...@@ -20,7 +20,7 @@ class Book(models.Model): ...@@ -20,7 +20,7 @@ class Book(models.Model):
title = models.CharField(max_length = 100) title = models.CharField(max_length = 100)
author = models.ForeignKey(Author, on_delete = models.CASCADE) author = models.ForeignKey(Author, on_delete = models.CASCADE)
publisher = models.CharField(max_length = 50) publisher = models.CharField(max_length = 50)
year_published = models.DateField(auto_now_add=True) year_published = models.IntegerField(default = 0)
ISBN = models.BigIntegerField(default = 0) ISBN = models.BigIntegerField(default = 0)
blurb = models.TextField(max_length = 1000) blurb = models.TextField(max_length = 1000)
......
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