Mar 30

Do not use appname as templatetags module

This is the second time I created same error writing templatetags, so it is about time to document it.

This is the bad layout for poll app.


Instead of it should be or something other different from appname.

Whats going on? would define polls module and it would not be possible to import other modules from original polls application. For example the code bellow would throw ImportError: No module named models
from django import template

from polls.models import Question

register = template.Library()