On Apr 3, 4:58 pm, Shawn Milochik <sh...@milochik.com> wrote:
> In short, it has to be on your PYTHONPATH or in the local directory.

OK, then I'm still not getting how this works.  The full path to my
setting and urls files are:

/Users/roy/s7/soco/soco-site/settings.py
/Users/roy/s7/soco/soco-site/urls.py

If I have in that settings file:

ROOT_URLCONF = 'soco-site.urls'

and start up my server from the soco-site directory, it finds the urls
file.  How?  If I print out sys.path from inside settings.py, it
includes /Users/roy/S7/soco/soco-site, but not /Users/roy/S7/soco.
Even stranger, "soco-site" is not a valid module name.  If I do
something like "import soco-site.urls", I (as expected) get a syntax
error.  So what's the process that gets from the string 'soco-
site.urls' to a valid module import?  Is django handing the string
'soco-site.urls' directly to imp.loadmodule(), or something like that,
or is it parsing the string in django application code and doing
something magic with it?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@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