django – How to refer back to index.html in the root directory when i'm currently in a subdirectory-ThrowExceptions

Exception or error:

This is an embarassingly noobish question but here goes….

I have a web directory structure as follows:

   index.html
   |_____/account/
   |_____/random-tweet/

In my random-tweet.html here is my code:

<a href="/">Home</a>

Clicking on this however tries to bring me to random-tweet/index.html as the url is currently
http://localhost:7000/random-tweet/

How to change the link so it brings me back to index.html in root directory??

Thanks in advance!

How to solve:

In random-tweet.html change the link to:

<a href="../">Home</a>

Leave a Reply

Your email address will not be published. Required fields are marked *