Error with custom inclusion_tag, can't find file


Error with custom inclusion_tag, can't find file



I'm trying to write a custom inclusion_tag in django.

Following the example on http://docs.djangoproject.com/en/dev/howto/custom-template-tags/

I'm just writing

@register.inclusion_tag('test.html') 

where test.html is a file in the same directory ( apps/my_app/templatetags) as the .py file which defines it.

But I'm getting a

TemplateDoesNotExist: test.html 

error. Which I suppose is because django can't find the template.

How could I check this? And what determines where django looks for the file?




How can I include user profile's images/logos on django comments

1:



What is the best practice to use ExtJS with Django Framework
Templates for templatetags go in the same places as those for normal views..
How can I use django forms/models to represent choices between fields?


Can I use a database view as a model in Django?


How to repeat a “block” in a django template

2:



How do I implement a common interface for Django related object sets?
I believe the included file is found by searching in the template locations defined in your settings file..
Django: retrieving abstract-derived models


Add row to inlines dynamically in django admin


80 out of 100 based on 50 user ratings 1250 reviews