Commit 490435fd authored by Jan Enzo Salvador's avatar Jan Enzo Salvador

Fixed an error in the get_absolute_url function

parent 42e0eb76
...@@ -12,7 +12,7 @@ class Author(models.Model): ...@@ -12,7 +12,7 @@ class Author(models.Model):
return self.last_name return self.last_name
def get_absolute_url(self): def get_absolute_url(self):
return reverse('bookshelf:author-details', kwargs={'pk':self.pk}) return reverse('author-details', kwargs={'pk':self.pk})
class Books(models.Model): class Books(models.Model):
title = models.CharField(max_length = 50, default = "") title = models.CharField(max_length = 50, default = "")
...@@ -26,4 +26,4 @@ class Books(models.Model): ...@@ -26,4 +26,4 @@ class Books(models.Model):
return self.title return self.title
def get_absolute_url(self): def get_absolute_url(self):
return reverse('bookshelf:book-details', kwargs={'pk':self.pk}) return reverse('book-details', kwargs={'pk':self.pk})
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