Commit 3fd9ce12 authored by Ysabella Panghulan's avatar Ysabella Panghulan

fixed project urls

parent 2ccaee0c
...@@ -17,7 +17,7 @@ class Author(models.Model): ...@@ -17,7 +17,7 @@ class Author(models.Model):
def get_absolute_url(self): def get_absolute_url(self):
return reverse('author-details', kwargs={'pk': self.pk}) return reverse('author-details', kwargs={'pk': self.pk})
def books(self): def get_books(self):
return Books.objects.filter(author=self) return Books.objects.filter(author=self)
class Books(models.Model): class Books(models.Model):
......
...@@ -22,9 +22,9 @@ ...@@ -22,9 +22,9 @@
</div> </div>
<div class="links"> <div class="links">
<ul> <ul>
<li><a href="/home">Home</a></li> <li><a href="/home/">Home</a></li>
<li><a href="/books">Books</a></li> <li><a href="/books/">Books</a></li>
<li><a href="/authors">Authors</a></li> <li><a href="/authors/">Authors</a></li>
</ul> </ul>
</div> </div>
{% endblock %} {% endblock %}
......
...@@ -20,8 +20,8 @@ ...@@ -20,8 +20,8 @@
</div> </div>
<div class="links"> <div class="links">
<ul> <ul>
<li><a href="/home">Home</a></li> <li><a href="/home/">Home</a></li>
<li><a href="/books">Books</a></li> <li><a href="/books/">Books</a></li>
</ul> </ul>
</div> </div>
{% endblock %} {% endblock %}
......
...@@ -15,9 +15,9 @@ ...@@ -15,9 +15,9 @@
<p>{{ object.blurb }}</p> <p>{{ object.blurb }}</p>
<div class="links"> <div class="links">
<ul> <ul>
<li><a href="/home">Home</a></li> <li><a href="/home/">Home</a></li>
<li><a href="/books">Books</a></li> <li><a href="/books/">Books</a></li>
<li><a href="/authors">Authors</a></li> <li><a href="/authors/">Authors</a></li>
</ul> </ul>
</div> </div>
{% endblock %} {% endblock %}
......
...@@ -20,8 +20,8 @@ ...@@ -20,8 +20,8 @@
</div> </div>
<div class="links"> <div class="links">
<ul> <ul>
<li><a href="/home">Home</a></li> <li><a href="/home/">Home</a></li>
<li><a href="/authors">Authors</a></li> <li><a href="/authors/">Authors</a></li>
</ul> </ul>
</div> </div>
{% endblock %} {% endblock %}
......
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
<p> Personally, I used to be more interested in movies and series than reading books. Reading books always felt like a chore to me, and I struggled to find books that kept me engaged and interested. However, over time, I discovered the world of self-help books and found myself drawn to the practical advice and guidance they offered. These books helped me learn new skills, gain new perspectives, and develop a better understanding of myself and the world around me. My favorite books include: Ikigai: The Japanese Secret to a Long and Happy Life and The Subtle Art of Not Giving a F*ck. </p> <p> Personally, I used to be more interested in movies and series than reading books. Reading books always felt like a chore to me, and I struggled to find books that kept me engaged and interested. However, over time, I discovered the world of self-help books and found myself drawn to the practical advice and guidance they offered. These books helped me learn new skills, gain new perspectives, and develop a better understanding of myself and the world around me. My favorite books include: Ikigai: The Japanese Secret to a Long and Happy Life and The Subtle Art of Not Giving a F*ck. </p>
<div class="links"> <div class="links">
<ul> <ul>
<li><a href="/books">Books</a></li> <li><a href="/books/">Books</a></li>
<li><a href="/authors">Authors</a></li> <li><a href="/authors/">Authors</a></li>
</ul> </ul>
</div> </div>
{% endblock %} {% endblock %}
......
...@@ -4,9 +4,9 @@ from . import views ...@@ -4,9 +4,9 @@ from . import views
from .views import (Homepage, BooksListView, BooksDetailView, AuthorListView, AuthorDetailView) from .views import (Homepage, BooksListView, BooksDetailView, AuthorListView, AuthorDetailView)
urlpatterns = [ urlpatterns = [
path('authors', AuthorListView.as_view(), name='authors'), path('authors/', AuthorListView.as_view(), name='authors'),
path('authors/<int:pk>/details', AuthorDetailView.as_view(), name='author-details'), path('authors/<int:pk>/details', AuthorDetailView.as_view(), name='author-details'),
path('books', BooksListView.as_view(), name='books'), path('books/', BooksListView.as_view(), name='books'),
path('books/<int:pk>/details', BooksDetailView.as_view(), name='book-details'), path('books/<int:pk>/details', BooksDetailView.as_view(), name='book-details'),
path('home', Homepage.as_view(), name='home'), path('home/', Homepage.as_view(), name='home'),
] ]
\ No newline at end of file
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