saziosu / book-swap

Code Institute: Project 4. Grade: Distinction
https://book-swap-13f900a2d9c7.herokuapp.com/
0 stars 1 forks source link

BUG: Anchor link #23

Closed saziosu closed 9 months ago

saziosu commented 9 months ago

Describe the bug Using an anchor link to move to the current books section on the homepage. If moving there from another page, like add-book, this tacks the anchor #books to the end of it. For example, add-book/#books

To Reproduce Steps to reproduce the behavior:

  1. Go to add-book
  2. Click on Current books in the navbar

Expected behavior This should redirect to the homepage #books section

saziosu commented 9 months ago

Resolved this by updating base.html to use {% url 'home' %}#books as the href instead of just #books Edit: adding resource used: https://stackoverflow.com/questions/25940811/how-to-add-anchor-to-django-url-in-template