Thanks I managed to fix the problem, now I need to know how to server
static media on Apache. Before I used Django development server and
made some configurations to serer static media (settings.py and html
files), so I want to know, are those settings need to change or
remove, and the proper way of serving static media. I used the Alias
directory..

Alias /templates/ "sites/testproject"

<Directory "sites/testproject">
    Order allow,deny
    Allow from all
</Directory>

But this didn't go well..

On Apr 9, 1:16 pm, Graham Dumpleton <[email protected]>
wrote:
> On 9 April 2010 17:09, MMRUser <[email protected]> wrote:
>
>
>
> > I'm getting an import error on my server's log
>
> > raise ImportError, "Could not import settings '%s' (Is it on sys.path?
> > Does it have syntax errors?): %s" % (self.SETTINGS_MODULE, e)
> > ImportError: Could not import settings 'myproject.settings' (Is it on
> > sys.path? Does it have syntax errors?): No module named
> > myproject.settings
>
> > but I appended it correctly in my django.wsgi script
>
> > import os
> > import sys
>
> > os.environ['DJANGO_SETTINGS_MODULE'] = 'myproject.settings'
>
> > sys.path.append('F:/Apache Software Foundation/Apache2.2/sites/
> > myproject')
> > import django.core.handlers.wsgi
> > application = django.core.handlers.wsgi.WSGIHandler()
>
> > Can't figure out the reason...
>
> > Python 2.6
> > Apache 2.2
> > mod_wsgi 3.0
>
> You added the wrong directory, should be the parent directory of the
> site, not the site directory itself.
>
> This is explained in:
>
>  http://code.google.com/p/modwsgi/wiki/IntegrationWithDjango
>
> But better than that, have a big read of:
>
>  http://blog.dscpl.com.au/2010/03/improved-wsgi-script-for-use-with.html
>
> and use the WSGI script described at the end of the latter, it may
> save you a lot of potential problems.
>
> Graham

-- 
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.

Reply via email to