Luiz C.
Luiz C.

Reputation: 776

Load custom template tag from another application?

Is this possible in any way? My project folder structure looks like this:

my_project:
    app1:
        templatetags:
            my_tags1.py (contains simple tags and inclusion tags)
    app2:
        templatetags:
            my_tags2.py (contains some simple tags)
    templates:
        app1: index.html
        app2: index.html

The ideas is to use a tag from my_tags1.py on the template app2/index.html. I simply tried:

{% load my_tags1 %} 

but that gives me an error.

Upvotes: 4

Views: 2924

Answers (1)

Luiz C.
Luiz C.

Reputation: 776

Make sure the tag files have different names.

Upvotes: 3

Related Questions