[Distutils] [buildout] pythonpath
Reinout van Rees
reinout at vanrees.org
Thu Mar 18 10:11:49 CET 2010
On 03/17/2010 06:15 PM, John Griessen wrote:
>
> My bin/django file does not have a path to admin templates
The paths in bin/django are locations where python looks for *python
code*. So "from django.conf import settings" or so means "search on
sys.path for django.conf", basically.
The sys.path in bin/django has nothing to do with template locations,
apart from one thing: all your django apps need to be findable here for
the template loader to be able to find templates in there.
I see django in that list, so that's OK:
> #!/usr/bin/python
>
> import sys
> sys.path[0:0] = [
> '/home/john/buildout/eggs/mock-0.6.0-py2.5.egg',
> [...snip...]
> '/home/john/WEBprojects/cottagematic_bld/parts/django',
Bingo, parts/django.
And you've got django.contrib.auth in your INSTALLED_APPS list, so
that's OK, too.
Weird.
Some further brainstorming:
- You're missing "cottagematic_com" (your project) in the INSTALLED_APPS
list. Is that right?
- Your sys.path contains '/usr/lib/python2.5/site-packages', which is
not something buildout puts in there by default. Did you modify it by hand?
- Your parts/django comes *after* (and also before) that suspicious
site-packages: do you perhaps have a different django version installed
globally that is thus found earlier than the django you want?
- Your cottagematic_bld similarly: that's after site-packages, so you
might not be using the settings.py of that
'/home/john/WEBprojects/cottagematic_bld', but of an older/different
version if that's by chance installed globally in that site-packages.
Hm. Probably a good idea to remove the bin/ directory and re-run buildout.
Reinout
--
Reinout van Rees - reinout at vanrees.org - http://reinout.vanrees.org
Programmer at http://www.nelen-schuurmans.nl
"Military engineers build missiles. Civil engineers build targets"
More information about the Distutils-SIG
mailing list