Probably, we all have a base.html that’s beind inherited by other templates. From the documentation we see that this:
{% extends "base.html" %}
Must be the first template tag in the child template. So, if we do this in base.html:
{% load my_tags %}
Inheritance will fail. Is there a way to make it available to make some tags available to all templates?
These two things have nothing to do with each other.
Wherever you put the
loadfunction in the template, the loaded tags are only available to that template – not any child templates, included templates, or ones rendered by inclusion tags. That’s just the way Django’s template scope works.If you really want to make your template tags available to all templates, see my answer here, but note that this usually a bad idea.