[Answer]-A basic django inclusion_tag not working

1👍

You’re not meant to render brand_model_select.html directly. Instead, you should call your template tag from a different template:

# in url conf
`url(r'^$', TemplateView.as_view(template_name='homepage.html'))`

# in homepage.html
{% load castest_extras %}
{% brand_model_select %}

The point of an inclusion tag is that you can include it in another view. What you’re doing right now doesn’t use the template tag at all; instead, it just renders brand_model_select.html completely ignoring the tag.

👤Danica

Leave a comment