python - What's the correct include path in this template? -



python - What's the correct include path in this template? -

i editing file:

/templates/account/base.html

and in want include:

/templates/profiles/includes/sub_nav.html

i have tried following:

{% block subnav %}{% include "profiles/includes/sub_nav.html"%}{% endblock %}

result: no error no inclusion of side bar

and have tried

{% block subnav %}{% include "../profiles/includes/sub_nav.html"%}{% endblock %}

result: template error page: exception value: caught templatedoesnotexist while rendering: ../profiles/includes/sub_nav.html

with next line highlighted: {% extends "account/base.html" %}

thus, below, should xxx contained /templates/account/base.html?

{% block subnav %}{% include "xxx/sub_nav.html"%}{% endblock %}

"result: no error no inclusion of side bar".

logical conclusion

your sub_nav.html has problems. or base.html has problem include working. must html, css or django tags.

python django django-templates include-path

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

intellij idea - Update external libraries with intelij and java -

javascript - send data from a new window to previous window in php -