Tim,

Yes!

I see now what I was doing wrong; I was setting the path in the Django 
settings.py (as I had found in the documentation), however, OF COURSE, that 
is irrelevant because it could ever get there before mod_wsgi being aware 
of where to look for libraries. Damn!

I was having the right idea, but digging in the wrong direction. Thanks 
again, this puts me back on track :-)

Thanks everybody in this thread, I have learn a lot in the way.

Regards,

Guillem



On Tuesday, 13 May 2014 13:04:00 UTC+2, Timothy W. Cook wrote:
>
> I am not sure where your problem is with locale.  Did you ever accomplish 
> recompiling mod_wsgi for Python 3.3? 
>
> This site http://www.ccdgen.com is Django 1.6, Python 3.3 and Apache 2.2 
> on CentOS 6.5 
>
> I recompiled mod_wsgi as per instructions I found somewhere on the WWW. 
>  Sorry I do not have the link now.  As I recall, there were several 
> additional packages I had to track down and install. 
>
> The Django code is in a User home subdirectory and the 'apache' user in 
> the 'ccdgen' group. 
>
> The relevant sections of httpd.conf are:
> Alias /icons/ "/var/www/icons/"
>
> <Directory "/var/www/icons">
>     Options Indexes MultiViews FollowSymLinks
>     AllowOverride None
>     Order allow,deny
>     Allow from all
> </Directory>
>
> Alias /static/ "/var/www/ccdgen/static/"
>
> <Directory "/var/www/ccdgen/static">
>     Options Indexes MultiViews FollowSymLinks
>     AllowOverride None
>     Order allow,deny
>     Allow from all
> </Directory>
>
>
>
> and 
>
> WSGIScriptAlias / /home/ccdgen/CCDGEN2/ccdgen/mlhim/wsgi.py
> WSGIPythonPath 
> /home/ccdgen/CCDGEN2/ccdgen/ccdgen:/home/ccdgen/CCDGEN2/ccdgen:/home/ccdgen/CCDGEN2/lib/python3.3/site-packages
> <Directory /home/ccdgen/CCDGEN2/ccdgen>
>    <Files wsgi.py>
>      Order allow,deny
>      Allow from all
>    </Files>
> </Directory>
>
>
> Maybe something here will 'stick out' as a solution for you.
>
> HTH,
> Tim
>
>
>
>
>  
>
>
> On Tue, May 13, 2014 at 6:14 AM, Guillem Liarte 
> <[email protected]<javascript:>
> > wrote:
>
>> Has anybody being able to solve this problem with the locale in virtual 
>> env?
>>
>> I am stuck with it for the moment.
>>
>> It is just that Centos 6 + Django 1.7 (python3.x ) is a no-go?
>>
>> Thanks.
>>
>> On Wednesday, 7 May 2014 16:33:23 UTC+2, Guillem Liarte wrote:
>>>
>>> Timothy,
>>>
>>> Thanks you, but SELinux here does not seem to be the issue. I tried with 
>>> enforcing/permissive/disabled and the effect is the same.
>>>
>>> I belive the problem to be in the os path in the seetings:
>>>
>>> ---
>>>
>>> import os
>>> BASE_DIR = os.path.dirname(os.path.dirname(__file__))
>>>
>>> ...
>>> ...
>>>
>>>
>>>
>>>
>>>
>>>                                                                             
>>>                                                                             
>>>                                      
>>> --
>>>
>>> in wsgi.py :
>>>
>>> ----
>>>
>>> import os, sys
>>> sys.path.append('/data/app/guillem-py3-dj17-test/guillem_test/guillem_test')
>>> os.environ.setdefault("DJANGO_SETTINGS_MODULE", "guillem_test.settings")
>>>
>>>
>>> ---
>>>
>>> python -c "import sys; print(sys.path)" 
>>> ['', '/data/app/guillem-py3-dj17-test/lib64/python33.zip', 
>>> '/data/app/guillem-py3-dj17-test/lib64/python3.3', 
>>> '/data/app/guillem-py3-dj17-test/lib64/python3.3/plat-linux', 
>>> '/data/app/guillem
>>> -py3-dj17-test/lib64/python3.3/lib-dynload', 
>>> '/opt/rh/python33/root/usr/lib64/python3.3', 
>>> '/opt/rh/python33/root/usr/lib/python3.3', '/data/app/guillem-py3-dj17-
>>> test/lib/python3.3/site-packa
>>> ges']
>>>
>>>
>>>
>>>
>>> I am reading about the differnces for mod_wsgi from python2.x to 
>>> python3.x but I fail to find clear documentation about how the wsgi.py and  
>>> settings.py should look like in python3.
>>>
>>> On Wednesday, 7 May 2014 00:20:00 UTC+2, Timothy W. Cook wrote:
>>>>
>>>>
>>>> On Tue, May 6, 2014 at 7:01 PM, Guillem Liarte <
>>>> [email protected]> wrote:
>>>>
>>>>>
>>>>>
>>>>> But I still get the locale encoding problem.  Do you guys have any 
>>>>> suggestions?
>>>>>
>>>>> I do not recall the exact error I had with this config (once you 
>>>> corrected those you mentioned) but eventually I had to set:
>>>>
>>>> $setenforce 0
>>>>
>>>> to disable SELinux security.  I am sure that there is a way around this 
>>>> but I haven't had a need to fix it yet. 
>>>>
>>>> HTH,
>>>> Tim
>>>>  
>>>>
>>>>
>>>> ============================================
>>>> Timothy Cook
>>>> LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook
>>>> MLHIM http://www.mlhim.org
>>>>
>>>>   -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> To post to this group, send email to [email protected]<javascript:>
>> .
>> Visit this group at http://groups.google.com/group/django-users.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/f61d9fbc-8922-4ba9-8564-45ae1eccf0f3%40googlegroups.com<https://groups.google.com/d/msgid/django-users/f61d9fbc-8922-4ba9-8564-45ae1eccf0f3%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
>
> ============================================
> Timothy Cook
> LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook
> MLHIM http://www.mlhim.org
>
>  

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" 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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/3e458469-9642-4a28-b72c-95a24e6b36ed%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to