views:

305

answers:

1

Hi,

Let say that I have:

proj1/app1
proj1/app1/templatetags/my_shared_tags.py
proj1/app2
proj1/templates
proj1/templates/app1/index.html
proj1/templates/app2/index.html

Now, how can I reuse a tag from my_shared_tag.py from app1 in my app2.

+2  A: 

have you tried doing it?

I'm pretty sure you can use all template tags in all templates out of the box with django :)

Jiaaro
I did try that. Error saying that it couldn't find the tags.I used:{% load my_shared_tags %}{% load app1/my_shared_tags %}{% load app1/templatetags/my_shared_tags %}No luck. I am wondering if I can put the project wide template tagsright under the proj1/templatetags/my_shared_tags.pyand have all the apps use it.If you have the exact syntax, it would be great.
VN44CA
A couple more things to check: Is the app that contains the template tags installed? does the templatetags dir contain an "__init__.py" file?
Jiaaro