diff --git a/src/django_components/templatetags/component_tags.py b/src/django_components/templatetags/component_tags.py index e3f2117e..3711cee5 100644 --- a/src/django_components/templatetags/component_tags.py +++ b/src/django_components/templatetags/component_tags.py @@ -28,6 +28,17 @@ ProvideNode.register(register) SlotNode.register(register) +@register.inclusion_tag('component_inside_include_sub.html') +def inclusion_tag(): + return {} + + +@register.inclusion_tag('component_inside_include_sub.html') +def inclusion_tag_working(): + # DJC_DEPS_STRATEGY = ignore fixes the expected behavior. + return {"DJC_DEPS_STRATEGY": 'ignore'} + + # For an intuitive use via Python imports, the tags are aliased to the function name. # E.g. so if the tag name is `slot`, one can also do: # `from django_components.templatetags.component_tags import slot` diff --git a/tests/test_dependency_rendering.py b/tests/test_dependency_rendering.py index 0e52f8da..ada45c2d 100644 --- a/tests/test_dependency_rendering.py +++ b/tests/test_dependency_rendering.py @@ -631,3 +631,69 @@ class TestDependencyRendering: