I am using Here is my directory structure : If I start my Django shell and try to import the I can also make my Still, I try to import the smarttitle.py strong> is as follows. Not only that, but I I can also import My Django Dev Server starts with ... P> I can import Edit strong>: I tried to first switch to my shell and switch to As stated in the comments, before you run Devenerver, virtualenv with my Python Django installation.
project / dev_environ / lib / python2.6 / site-packages / ... django / titlecase / # & Lt; - Titlecase module PIL / ... bin / ... dragon # & lt; - Python ... included / django_project / localsite / templatetags / __init__.py smarttitle.py # & lt; - My theme module foo_app / bar_app / settings.py Manage.py
titlecase OK, because
titlecase is in
Sys.path on
dev_environ / lib / python2.6 / site-packages / titlecase .
$: django_project cwilcox $ ../dev_environ/ Bin / python manage.py Shell Python 2.6.1 (R261: 67515, June 24, 2010, 21:47:49) [GCC 4.2 .1 (Construction of Apple Inc. 5646)] Darwin type "help", "copyright", "credit" or "license" (interactive console) for more information; & Gt; & Gt; Import Heading # lt; - No import error! & Gt; & Gt; & Gt;
settings.py file without any error
smarttitle.py > get an
importError code> is. P>
{Code> {% load smarttitle%} code> and there is no error in it. P>
../ dev_environ / bin / python manage.py driver code> pre> < P> In summary: em> p>
titlecase code> module anywhere em> inside this templatetag library, where it Throws a
ImportError code>! what gives?! Any ideas? P>
source dev_environ / bin / activate code> , But it did not help - I'm still importing inside my templatetag module. I was already calling the proper Pyro binary manually. P> div>
source bin / activate VirtualAvolution by using code> (or just
.bin / activate code>), even if you are already reaching the correct Python executable. P> div> html>
Comments
Post a Comment