Interesting. I take it that hg and hg/hooks both have __init__.py files? Otherwise I'm not sure how django sees them. Unless hg is also an app, listed in installed apps and has a models.py file. That is, I don't believe that the name 'hg' has any special meaning to django.
You might try sticking "import pdb;pdb.set_trace()" in the beginning of settings.py to see if it is at least trying to be imported. If the breakpoint is hit, you could "n" your way through the file to see if something is getting an exception that prevents the import from succeeding, then back up by moving the set_trace() to just before the failing item, restart, and "s" your way into the failing item to see how it manages to depend on the presence of an "hg" directory. On Wed, Nov 25, 2009 at 2:18 PM, Stodge <[email protected]> wrote: > I think I have it. I'm developing a Mercurial hook in /var/www/sites/ > project/hg/hooks. If I delete this directory it works. If I recreate > the directory and the hook, it fails. Guess Django is getting confused > by its existence. > > On Nov 25, 12:56 pm, Bill Freeman <[email protected]> wrote: >> Does /var/www/sites/project/__init__.py exist? >> >> Are the files and directories readable, and the directories searchable >> (excutable) >> by the user as which the webserver runs? >> >> On Wed, Nov 25, 2009 at 12:21 PM, Stodge <[email protected]> wrote: >> > If I break the code out and write a simple python script that only >> > contains: >> >> > import sys, os >> > sys.path.append("/var/www/sites") >> > from project import settings >> > from django.core.management import setup_environ >> > setup_environ(settings) >> >> > Even this doesn't work yet as far as I can tell, it should. Any ideas? >> >> > -- >> >> > You received this message because you are subscribed to the Google Groups >> > "Django users" group. >> > To post to this group, send email to [email protected]. >> > To unsubscribe from this group, send email to >> > [email protected]. >> > For more options, visit this group >> > athttp://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 [email protected]. > To unsubscribe from this group, send email to > [email protected]. > 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

