OK. I get it now. Crazy as this sounds my confusion was that I never noticed the WSGI_APPLICATION setting before. The last version of Django I used was Django 1.5 and we didn't use a WSGI_APPLICATION setting. Hence I didn't understand with runmodwsgi at settings load how Django knows anything about wsgi. In our old distro, the only place the wsgi application appeared was in the apache conf.
On Monday, August 22, 2016 at 9:40:29 PM UTC-6, Graham Dumpleton wrote: > > > > On 23 Aug 2016, at 1:06 PM, 'Danny' via modwsgi <[email protected] > <javascript:>> wrote: > > > > BTW how can the --entry-point or something similar not be necessary. It > isn't set in an environment variable and it doesn't seem to be last > argument like mod_wsgi-express. In principle I want to run multiple wsgi.py > files and the is no canonical location. > > The whole point of the runmodwsgi management command for Django is that it > works out what the WSGI application entry point is based on what is > specified in the Django settings modules being used. Same for static file > handling, the runmodwsgi management command will automatically insert > options so that the Django static files are hosted. > > Presumably if you had for some reason different WSGI application entry > points for your Django application for some reason (never seen anyone do > that), you would have different Django settings module with a different > WSGI_APPLICATION setting. The runmodwsgi management command would pick that > up. > > So as long as you set DJANGO_SETTINGS_MODULE as environment variable, if > you need to override default set by manage.py, you are good. > > 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.
