[Django]-Can not nest {% static %} tag under if block in Django template

6đź‘Ť

âś…

Think of it like an import statement where the base template is a function within one module that is calling a function in another module, the derived template, with some parameters.

The “import” in the base template doesn’t get inherited by the derived template and thus it needs to be “imported” with {% load ... %}

👤Adam Kerz

Leave a comment