On 7 February 2012 22:17, Евгений Негрий <[email protected]> wrote:
> What is filename extension may use in wsgi application ? *.wsgi or
> *.py ? What difference ?
> Sorry for stuped question.

There is no specific extension you must use.

Whatever the extension it is still Python code in it.

The reason that a .wsgi extension was promoted instead of .py was to
avoid people trying to import the WSGI script file as a Python module.
Doing so would have resulted in two copies of the module in memory
because when loaded as a WSGI script file it is assigned a module name
generated based on the full path to the WSGI script file. This is in
contrast to a module import where the name is based on basename (just
filename without extension) of the file.

So, you could use:

  WSGIScriptAlias / /some/path/app.wsgi

or:

 WSGIScriptAlias / /some/path/app.py

or even:

  WSGIScriptAlias / /some/path/django.app

The mod_wsgi module will not care and will load the file regardless.

Same applies to other methods of configuring mod_wsgi but I will not
go into those so as to avoid confusing things by giving too many
options.

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