Import Error when use templatetags in Django

Posted by zmfantasy on Stack Overflow See other posts from Stack Overflow or by zmfantasy
Published on 2010-05-05T09:14:35Z Indexed on 2010/05/05 9:18 UTC
Read the original article Hit count: 254

Filed under:
|
|
|

Well, when I'm trying to use 'inclusion' in Django, I met some confused problems that I can't solve it by myself.

There is the structures for my project.

MyProject---
            App1---
                   __init__.py
                   models.py
                   test.py
                   urls.py
                   views.py
            App2---
                   ...
            template---
                       App1---
                              some htmls
                       App2---
                              ...
            templatetags---
                           __init__.py
                           inclusion_test.py
            manage.py
            urls.py
            __init__.py
            settings.py

I have registered templatetags folder in the settings.py (Both in Installed APPS & TEMPLATE_DIRS). But when I want to use {% load inclusion_test %} in my html, it raise an exception like this:

'inclusion_cld_tags' is not a valid tag library: Could not load template library from django.templatetags.inclusion_cld_tags, No module named inclusion_cld_tags

I think there is nothing wrong with my import work, how can I do with that?

Thanks for help!

My django version: 1.0+ My Python version: 2.6.4

© Stack Overflow or respective owner

Related posts about python

Related posts about django