1đź‘Ť
Django templates do not work that way.
Docs say: “Template inheritance allows you to build a base “skeleton” template that contains all the common elements of your site and defines blocks that child templates can override”. So child templates only provide info, the content of a block to parent. And that’s all. They do nothing with arrangement.
You need to make another base template and extend it to get another block order on a page.
👤chem1st
0đź‘Ť
I solved this by moving each block into its own template, then
{% include "foo.html" %}
{% include "bar.html" %}
{% include "baz.html" %}
in the order I needed.
👤thumbtackthief
- Reverse for 'shop_cart' with arguments '()' and keyword arguments '{}' not found. 0 pattern(s) tried: []
- Heroku looking for the wrong wsgi file. Django
- Can't access models from seperate: ImportError: no module named "HealthNet.ActivityLog"
- Required field validator does not work in Django on azure
- Tastypie queryset values is not being displayed
Source:stackexchange.com