Is it possible to display a specific block from a template in django? -


just in html when reference section of page instance<a href="#tips">visit useful tips section</a> there way similar thing in django if instance wanted load page straight tips section? extending base.html home page has tips section. right have static url <a href="some url/#tips">home</a> want exact same djangos dynamic url {% url 'home'/#tips %}

you can add fragment identifier right after url returned {% url %} template tag:

<a href="{% url 'home' %}#tips">home</a> 

Comments

Popular posts from this blog

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -

javascript - oscilloscope of speaker input stops rendering after a few seconds -