Karen, thanks for your reply.   The module myapp/templatetags does
have an __init__.py file.  There is no __init__.pyc file, though.

n...@nate-desktop:~/work/django-projects/myproject/myapp$ ls templatetags/
mytags.py  __init.py__

On Sun, Dec 19, 2010 at 8:59 PM, Karen Tracey <kmtra...@gmail.com> wrote:
> On Sun, Dec 19, 2010 at 8:40 PM, Nate Reed <natereed....@gmail.com> wrote:
>>
>> When I try to import my module in the shell I also am unable to import it:
>>
>> >>> from django.templatetags import mytags
>> Traceback (most recent call last):
>>  File "<console>", line 1, in <module>
>> ImportError: cannot import name mytags
>> >>> from myapp.templatetags import mytags
>> Traceback (most recent call last):
>>  File "<console>", line 1, in <module>
>> ImportError: No module named templatetags
>>
>> Does this mean something is wrong with my path or setup?  Any ideas?
>
> Looks like the myapp/templatetags directory is missing an __init__.py file.
> You need this in order for Python to include it in the search for modules on
> import.
>
> (As a side note, the error message that implies only django.templatetags was
> searched for your custom template tags was misleading and has been improved
> in newer releases.)
>
> Karen
> --
> http://tracey.org/kmt/
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to