added get absolute url function for Author model

parent 62eaa83e
......@@ -13,6 +13,9 @@ class Author(models.Model):
def __str__(self):
return self.first_name + " " + self.last_name
def get_absolute_url(self):
return (reverse('bookshelf:author-details', kwargs={'pk' : self.pk}))
#Book
#title; author; publisher; year_published; ISBN; blurb
......
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