Satchmo may be breaking some rules (unwritten) about how to do stuff
with Django.
Try replacing you WSGI script contents of:
import os
import sys
sys.path.append('/root/src/satchmo/satchmo/apps')
sys.path.append('/srv/www//duckling.org')
sys.path.append('/srv/www//duckling.org/store')
os.environ['DJANGO_SETTINGS_MODULE'] = 'store.settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
with the following. Keep a copy of what you had before so can be
restored if this makes no difference. And yes I have deliberately left
one of the paths out of sys.path.
import sys
sys.path.insert(0, '/root/src/satchmo/satchmo/apps')
sys.path.insert(0, '/srv/www//duckling.org/store')
import settings
import django.core.management
django.core.management.setup_environ(settings)
utility = django.core.management.ManagementUtility()
command = utility.fetch_command('runserver')
command.validate()
import django.conf
import django.utils
django.utils.translation.activate(django.conf.settings.LANGUAGE_CODE)
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
If that makes a difference then I will explain more.
Graham
On 13 December 2010 12:05, j <[email protected]> wrote:
> Wow, loading the parent directory like you suggested got rid of the "Could
> not import settings 'store.settings' (Is it on sys.path? Does it have syntax
> errors?): No module named store.settings" error. So I think that's huge
> progress in getting this app up and running. \o/
> The server logs give me this:
> mod_wsgi (pid=6454): Exception occurred processing WSGI script
> '/srv/www/duckling.org/store/wsgi-scripts/django.wsgi'.
> [Sun Dec 12 16:47:26 2010] [error] Traceback (most recent call last):
> [Sun Dec 12 16:47:26 2010] [error] File
> "/usr/local/lib/python2.6/dist-packages/django/core/handlers/wsgi.py", line
> 230, in __call__
> [Sun Dec 12 16:47:26 2010] [error] self.load_middleware()
> [Sun Dec 12 16:47:26 2010] [error] File
> "/usr/local/lib/python2.6/dist-packages/django/core/handlers/base.py", line
> 42, in load_middleware
> [Sun Dec 12 16:47:26 2010] [error] raise
> exceptions.ImproperlyConfigured('Error importing middleware %s: "%s"' %
> (mw_module, e))
> [Sun Dec 12 16:47:26 2010] [error] ImproperlyConfigured: Error importing
> middleware satchmo_store.shop.SSLMiddleware: "No module named
> satchmo_store.shop.SSLMiddleware"
> I wonder if this is a Satchmo issue now? (because something is not loading
> from SSLMiddleware) or maybe I need to tell Mod_wsgi where it's at? I'm
> think the latter but I'm not sure. I'm going to think about this before I
> make any changes as I think I'm making some progress in getting this django
> app up and running. In my opinion, that it got rid of the "cannot load
> store.settings" is very encouraging.
> Would you suggest in finding what module this is and where it's at on my
> system, then 1) seeing if it's installed (my app runs fine on test server
> but not sure it it's simply running without this module) and 2) If it is
> installed find the path and load it into the my django.wsgi file by way of
> sys.append?
> Thanks again!
> Jim
>
> --
> You received this message because you are subscribed to the Google Groups
> "modwsgi" 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/modwsgi?hl=en.
>
--
You received this message because you are subscribed to the Google Groups
"modwsgi" 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/modwsgi?hl=en.