Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.

#1 Dec. 15, 2010 16:49:07

Álex G.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

virtualenv and deployment


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?

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.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#2 Dec. 15, 2010 16:55:30

Piotr Z.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

virtualenv and deployment


Better would be to create the requirements.txt and install directly onthe server (pip install ir requirements.txt)I use mod_wsgi

On 10-12-15 08:48, Álex González wrote:Hi!I'm using virtualenv with --no-site-packages and now I like to do adeployment of my app... I'm using a sharing hosting, can I uypload allmy enviroment dir (with the packages installed with pip) to the serverand use them?What's the better way to the deployment? mod_python, mod_wsgi, perhapsfast-cgi?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 GoogleGroups "Django users" group.To post to this group, send email to django-us...@googlegroups.com.To unsubscribe from this group, send email todjango-users+unsubscr...@googlegroups.com.For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.--
bloghttp://piotr.zalewa.infojobshttp://webdev.zalewa.infotwithttp://twitter.com/zalunfacehttp://www.facebook.com/zaloon--
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 athttp://groups.google.com/group/django-users?hl=en.

Offline

#3 Dec. 15, 2010 16:58:42

Piotr K.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

virtualenv and deployment


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?
>

That won't necessarily work. Some packages need to be compiled, so it would
only work if both environments are the same architecture.


> What's the better way to the deployment? mod_python, mod_wsgi, perhaps
> fast-cgi?
>

mod_python is too old, I'm running fine with both nginx+mod_fcgi as well as
Apache+mod_wsgi.

As my namesake mentioned, I'd freeze your env and rebuild it using pip
install. Of course you have access to the cline on the server? :)

Regards,
Piotr

--
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 athttp://groups.google.com/group/django-users?hl=en.

Offline

#4 Dec. 15, 2010 18:42:01

W. C.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

virtualenv and deployment


Alex ...

In order to do a simple copy you'll need to make sure that:

1. You're using the exact same version of Python on the host as you use
to develop.
2. Python is installed in exactly the same locations (host and local).
3. Your environment is located in the same locations (host and local).

If not, you're going to need to experiment with virtualenv --relocatable to
see if it meets your needs. (I'm doing this for my application, but it
isn't perfect, and doesn't work well with Windows.)

Failing that, you may need to create a new virtual environment on the host,
and then install your packages using pip, before copying your application
files. (pip freeze and pip bundle can be your friends here.)

- Craig -

On Wed, Dec 15, 2010 at 11:48, Á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?
>
> 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.
>

--
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 athttp://groups.google.com/group/django-users?hl=en.

Offline

#5 Dec. 15, 2010 18:49:58

O.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

virtualenv and deployment


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.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#6 Dec. 15, 2010 21:56:49

Álex G.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

virtualenv and deployment


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.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#7 Dec. 15, 2010 22:20:10

k.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

virtualenv and deployment


Wow very timely thread!

I am trying to deploy on Dreamhost and struggling.

They have a nice easy to build Django env, but getting my app
running... thats been another matter.

Thanks for asking Alex, and thanks for all the replies to this. Very
informative.

On Dec 15, 1:56 pm, Á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...@google
> >> groups.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...@google
> > groups.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 athttp://groups.google.com/group/django-users?hl=en.

Offline

#8 Dec. 15, 2010 23:57:16

W. C.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

virtualenv and deployment


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 " + 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.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#9 Dec. 16, 2010 08:52:12

Álex G.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

virtualenv and deployment


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 " + 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 " + 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 athttp://groups.google.com/group/django-users?hl=en.

Offline

#10 Dec. 16, 2010 14:21:38

W. C.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

virtualenv and deployment


Alex ...

This is the point where my experience ends -- I'm not operating in a hosting
environment. I can tell you that mod_python has to be compiled for a
specific version of Apache AND Python (one of the reasons that mod_wsgi is
better is that it breaks the Python-version dependency). If you need a
different Python (2.6 in this case), you'll need a differ mod_python. I
won't know how it gets installed and configured in your hosting
environment. Sorry.

- Craig -

On Thu, Dec 16, 2010 at 03:51, Álex González <agonzale...@gmail.com> wrote:

> 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 " + 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 " + 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<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.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

Board footer

Moderator control

Enjoy the 18th of October
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support