Commit d594fc8b authored by Alec Dayupay's avatar Alec Dayupay

Fixed Author.__str__()

parent ccb1108d
Pipeline #3027 failed with stages
......@@ -8,6 +8,9 @@ class Author(models.Model):
nationality = models.CharField(max_length=50)
bio = models.TextField(max_length=700)
def __str__(self):
return "{} {}".format(self.first_name, self.last_name)
class Books(models.Model):
title = models.CharField(max_length=50)
author = models.ForeignKey(Author, on_delete=models.CASCADE)
......
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