Thanks for your reply Craig, to use mod_python in my hosting I'm using this .htaccess file:
SetHandler python-program PythonOption django.root / PythonHandler django.core.handlers.modpython PythonPath "['/var/www/vhosts/myhosting.com/httpdocs'] + sys.path" SetEnv DJANGO_SETTINGS_MODULE settings PythonDebug On The problem is that when I need to install something I must talk with the shared hosting admin, and this isn't working because the python is 2.3. The administrator said me that I must activate python26-mod_python.so but I can't use the LoadModule directive in .htaccess so I don't know what he want and I'm waiting for a reply yet... You are using your self handler in python code to load the webpage? Can I force here to use the python2.6 interpreter instead the 2.3? Thanks for you help! On Thu, Dec 16, 2010 at 00:57, W. Craig Trader <craig.tra...@gmail.com>wrote: > Alex ... > > You're not going to be able to trick your host into loading mod_wsgi from > an .htaccess file -- Apache doesn't allow the load directives in .htaccess > files. > > While mod_python is not supported, and it has a large number of open > issues, there aren't any specific security holes you really need to worry > about; I'm using mod_python on a project at work because mod_wsgi isn't > supported in our deployment environment. I wouldn't recommend mod_python as > the direction for all future work, but it will get the job done until you > can get mod_wsgi deployed with your host (or move to another host). > > See my earlier post from today (look for Re: running projects on the back > of a base URL and having issues with the homepage) for more details about > making mod_wsgi work with VirtualEnv. The apache script for mod_python is > similar to the one I posted earlier ; the only differences involve making > certain that you chdir to your project directory, and that you import the > Django mod_python handler. > > The mod_python configuration is significantly different from the mod_wsgi > configuration, and look like this: > > <Location "/"> > SetHandler python-program > PythonPath "[ '/data/web/foo/apache', ] + sys.path" > PythonHandler django_mp > PythonInterpreter foo > </Location> > > Alias /static/ /data/web/foo/site/foo/static/ > <Location /static/> > SetHandler None > </Location> > > In this case, mp_python represents /data/web/foo/apache/mp_python.py, which > is my script to deal with configuring the VirtualEnv environment and then > starting the Django mod_python handler. It's basically an amalgam of the > VirtualEnv activate_this.py script, and the mod_python startup script from > the Django documentation. > > - Craig - > > On Wed, Dec 15, 2010 at 16:56, Álex González <agonzale...@gmail.com>wrote: > >> Hi guys! >> >> Thanks for your replies! >> >> My hosting is a shared hosting and I think that I can only uses mod_python >> at the moment. I can load mod_wsgi from htaccess (I test it) but I can edit >> my virtualhosts or something similar... any trick to get mod_wsgi >> up&running? >> >> About the virtualenv as Piotr said, some modules must be compiled, so my >> solution was create a requeriments files as he said, but include in my code >> django-registration and django-piston because the versions installed with >> pip doesn't work for me (it said me that it's the correct version, but I can >> get a actual version at bitbucket). >> >> Now my question is, mod_python is deprecated but it's dangerous to use it >> for a months (until I get money to migrate the code to a non-shared >> hosting?). And the old question: can I trick the hosting to use mod_wsgi if >> I can load it from htaccess? >> >> Thanks! >> >> >> On Wed, Dec 15, 2010 at 19:49, Ovnicraft <ovnicr...@gmail.com> wrote: >> >>> >>> >>> On Wed, Dec 15, 2010 at 11:48 AM, Álex González >>> <agonzale...@gmail.com>wrote: >>> >>>> Hi! >>>> >>>> I'm using virtualenv with --no-site-packages and now I like to do a >>>> deployment of my app... I'm using a sharing hosting, can I uypload all my >>>> enviroment dir (with the packages installed with pip) to the server and use >>>> them? >>>> >>>> What's the better way to the deployment? mod_python, mod_wsgi, perhaps >>>> fast-cgi? >>>> >>> >>> >>> Remember mod_python is deprecated. >>> >>> Regards, >>> >>> >>>> Thanks! >>>> >>>> -- >>>> @agonzalezro <http://twitter.com/agonzalezro> >>>> Please, don't send me files with extensions: .doc, .docx, .xls, .xlsx, >>>> .ppt and/or .pptx >>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "Django users" group. >>>> To post to this group, send email to django-us...@googlegroups.com. >>>> To unsubscribe from this group, send email to >>>> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com> >>>> . >>>> For more options, visit this group at >>>> http://groups.google.com/group/django-users?hl=en. >>>> >>> >>> >>> >>> -- >>> Cristian Salamea >>> @ovnicraft >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "Django users" group. >>> To post to this group, send email to django-us...@googlegroups.com. >>> To unsubscribe from this group, send email to >>> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com> >>> . >>> For more options, visit this group at >>> http://groups.google.com/group/django-users?hl=en. >>> >> >> >> >> -- >> @agonzalezro <http://twitter.com/agonzalezro> >> Please, don't send me files with extensions: .doc, .docx, .xls, .xlsx, >> .ppt and/or .pptx >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To post to this group, send email to django-us...@googlegroups.com. >> To unsubscribe from this group, send email to >> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com> >> . >> For more options, visit this group at >> http://groups.google.com/group/django-users?hl=en. >> > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us...@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > -- @agonzalezro <http://twitter.com/agonzalezro> Please, don't send me files with extensions: .doc, .docx, .xls, .xlsx, .ppt and/or .pptx -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.