R
R
Ruslan Bergutov2015-05-13 13:24:44
Django
Ruslan Bergutov, 2015-05-13 13:24:44

How to set absolute links in Django navbar?

There is a site on django, there is a navigation bar, being on the page 127.0.0.1:8000/contacts by clicking on the blog page in the navigation bar, we will get not to 127.0.0.1:8000/blog , but to 127.0.0.1:8000/contacts/blog how to set absolute links using names from urls?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Kitaev, 2015-05-13
@Scirocco

In urls
In template:
<a href="{% url 'blog' %}">Go ahead</a>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question