Mark Phillips wrote on 05/14/07 11:07: > Decided to try a clean slate. Set up Django on SME Server 7.1, which > is based on Centos 4. > Compiled and installed mod_python > Amended httpd.conf as follows: > > LoadModule python_module modules/mod_python.so > > and later on in the file... > <Location "/mysite/"> > SetHandler python-program > PythonPath "['/usr/local/mysite'] + sys.path" > PythonHandler django.core.handlers.modpython > SetEnv DJANGO_SETTINGS_MODULE mysite.settings > PythonDebug On > PythonAutoReload On > </Location> > > Downloaded Django into python2.3/site-packages with svn co http:// > code.djangoproject.com/svn/django/trunk/django django > > Restarted the server. Created a new project "mysite". Left the file > mysite.settings as created by "startproject". The manage.py validate > and runserver methods ran without errors. > > Ran into trouble when attempting to browse to the site "www.myweb.com/ > mysite". Here is the trace back from the browser: > > Mod_python error: "PythonHandler django.core.handlers.modpython" > > Traceback (most recent call last): > > File "/usr/lib/python2.3/site-packages/mod_python/apache.py", line > 299, in HandlerDispatch > result = object(req) > > File "/usr/lib/python2.3/site-packages/django/core/handlers/ > modpython.py", line 177, in handler > return ModPythonHandler()(req) > > File "/usr/lib/python2.3/site-packages/django/core/handlers/ > modpython.py", line 145, in __call__ > self.load_middleware() > > File "/usr/lib/python2.3/site-packages/django/core/handlers/ > base.py", line 22, in load_middleware > for middleware_path in settings.MIDDLEWARE_CLASSES: > > File "/usr/lib/python2.3/site-packages/django/conf/__init__.py", > line 28, in __getattr__ > self._import_settings() > > File "/usr/lib/python2.3/site-packages/django/conf/__init__.py", > line 55, in _import_settings > self._target = Settings(settings_module) > > File "/usr/lib/python2.3/site-packages/django/conf/__init__.py", > line 83, in __init__ > raise EnvironmentError, "Could not import settings '%s' (Is it > on sys.path? Does it have syntax errors?): %s" % > (self.SETTINGS_MODULE, e) > > EnvironmentError: Could not import settings 'mysite.settings' (Is it > on sys.path? Does it have syntax errors?): No module named > mysite.settings > > Where did I goof? > > >
<Location "/mysite/"> ... PythonPath "['/usr/local'] + sys.path" ... </Location> --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---