> On 1 Jul 2017, at 4:17 PM, Anupam Jain <[email protected]> wrote:
> 
> First of all - thanks for mod_wsgi express!
> 
> This <http://blog.dscpl.com.au/2015/04/introducing-modwsgi-express.html> post 
> says "As to the configuration of Apache, there actually wasn't any."
> 
> Is it ok to assume that I dont need to do any configuration on Apache at all 
> (as in nothing in conf-enabled/available and sites-enabled/available)? (That 
> sounds to be too good to be true so thought to check)

Do not touch any system Apache configuration files under /etc/apache2, 
/etc/httpd or whatever directory it is that your operating systems puts the 
Apache configuration. When you use mod_wsgi-express it completely ignores them, 
does not modify them, nor use them in any way.

> 
> I have setup everything for mod_wsgi express and getting the error 
> "ImportError: No module named '(projectname)'"

What command did you run and what arguments to mod_wsgi-express?

If you get an error with that exact message, then it indicates you copied some 
template for something from somewhere where you were expected to replace 
'(projectname)' with a different value for your project. Did you do that? Or is 
this not actually the error message you go.

When you run mod_wsgi-express the directory you run mod_wsgi-express in should 
be added to the Python module search path, so as long as any modules can be 
imported from that location you should be good. If that shouldn't be the base 
directory for imports of your projects, you can use --working-directory option 
to override it, or use the --python-path option to specify additional 
directories to search for modules.

So what is the directory layout for your project, which directory are you 
running mod_wsgi-express from and with what arguments.

> This is not the one caused by circular imports but something to do with 
> setting the path somewhere I think (as I learnt from some SO posts) but not 
> entirely clear about it
> 
> I did setup a django.conf in Apache's conf-enabled, so I am suspecting that 
> may be conflicting with something.

It shouldn't as it will be ignored.

If you are using Django, you should perhaps look at:

    http://blog.dscpl.com.au/2015/04/using-modwsgi-express-with-django.html 
<http://blog.dscpl.com.au/2015/04/using-modwsgi-express-with-django.html>
    http://blog.dscpl.com.au/2015/04/integrating-modwsgi-express-as-django.html 
<http://blog.dscpl.com.au/2015/04/integrating-modwsgi-express-as-django.html>

Also worthwhile reading:

    http://blog.dscpl.com.au/2015/05/using-modwsgi-express-as-development.html 
<http://blog.dscpl.com.au/2015/05/using-modwsgi-express-as-development.html>

Note that if you have inherited an old Django code base which hasn't been 
updated correctly so the settings module includes settings defined in newer 
Django versions, and you have restructured your application code so the 
settings module is now at a different directory level, and you are using the 
method of integrating mod_wsgi-express into Django itself, you may also have 
issues with the settings module not being found when being imported.

So also indicate what version of Django your project code was originally 
created using.

Graham

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.

Reply via email to