Answer the question
In order to leave comments, you need to log in
How do you add blocks to the right and left columns of the site?
There was such a question.
I have a main base.html file that contains all the content through:
{% block content %}
{% endblock %
} the same part (side) will have other information. Would it be correct to lay out these blocks separately inside classifieds.html and yellowpages.html without touching base.html at all?
Answer the question
In order to leave comments, you need to log in
It is not entirely clear how the templates are made, in base.html you specify the blocks that you will redefine in inherited templates, you need to specify even if there is no content in it. For example, you define in base.html
{% block left_column %}
{% endblock %}
{% block left_column %}
{% for item in advertisements %}
{{ item.text }}
{% endfor %}
{% endblock %}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question