#10426: Add a description of language environment variales to "How to use Django
with Apache and mod_python" doc page
------------------------------------+---------------------------------------
          Reporter:  daybreaker     |         Owner:  nobody                    
                                                           
            Status:  new            |     Milestone:  1.1                       
                                                           
         Component:  Documentation  |       Version:  1.0                       
                                                           
        Resolution:                 |      Keywords:  i18n unicode utf-8 file 
path apache mod_python mod_wsgi language environment variable
             Stage:  Accepted       |     Has_patch:  0                         
                                                           
        Needs_docs:  0              |   Needs_tests:  0                         
                                                           
Needs_better_patch:  0              |  
------------------------------------+---------------------------------------
Comment (by grahamd):

 Not all Apache distributions have a envvars file. This is especially the
 case with Linux distributions which ignore the Apache Software Foundation
 (ASF) installation layout and use their own. Don't think Windows has it
 either, or whether they use same way of setting it anyway.

 Whether one could set LANG or LC_LANG using os.environ in a WSGI script
 file for mod_wsgi would depend on whether they actually need to be seen
 during Python initialisation or only when files are first loaded by or for
 Django.

 If they must be set before Python is initialised then it may be better to
 have a configuration directive for mod_wsgi can set it. This does get
 tricky though as embedded mode of mod_wsgi shares processes with other
 Apache modules, eg.,  PHP, so it can be anti social to be overriding
 these. Also, different Django instances running in different daemon mode
 processes may need different language settings and so setting it once
 before Python initialised may not work anyway so definitely need a
 different way.

 Thus, how does LANG and LC_LANG come into play? For mod_wsgi at least,
 can't they just be set using os.environ in the start of the WSGI script
 before Django is loaded?

 Can more detail about the original problem being addressed perhaps be
 added here so can suggest what would be the best approach to getting
 around it.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/10426#comment:2>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" 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/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to