Multiple versions of Django

55 views
Skip to first unread message

Jasvir Singh

unread,
Sep 30, 2013, 11:25:49 AM9/30/13
to django...@googlegroups.com
Is it possible to install multiple versions of Django on single ubuntu server.
If yes, please tell me how to do this.
I have already made a try for this using virtual environment, but
found that it is only for development.

--

Jasvir Singh Grewal
Blog:http://jasvirsinghgrewal91.wordpress.com/

Gerald Klein

unread,
Sep 30, 2013, 11:28:02 AM9/30/13
to django...@googlegroups.com
Yes, use something like VirtualEnv, it allows you to separate website environments and requirements and it has nice additionals to help you publish


--
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 django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
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/CAN_O85vhiKvpdxf74stvfR1AsLcoP6E1EeC1M86nHgFRF34K1g%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.



--

Gerald Klein DBA

Cont...@geraldklein.com

www.geraldklein.com

geraldklein.wordpress.com

j...@zognet.com

708-599-0352


Arch Awesome, Ranger & Vim the coding triple threat.

Linux registered user #548580 

Brought to you by the Amish Mafia

Gerald Klein

unread,
Sep 30, 2013, 11:30:56 AM9/30/13
to django...@googlegroups.com
Sorry please disregard I didn't read far enough into your message


On Mon, Sep 30, 2013 at 10:25 AM, Jasvir Singh <jassig...@gmail.com> wrote:
--
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 django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
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/CAN_O85vhiKvpdxf74stvfR1AsLcoP6E1EeC1M86nHgFRF34K1g%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Bill Freeman

unread,
Sep 30, 2013, 11:48:09 AM9/30/13
to django-users
Virtual environments can, indeed, be used under Apache.  I presume other front ends can also handle this.

For Apache, the separate VE's need to be in separate deamon process groups, so that their sys.path settings can differ.

The primary thing that virtualenv does for you is tweak sys.path, usually by setting PYTHONHOME, but there are other ways.

If using a new enough mod_wsgi (3.4 or later, I htink), there is a python-home option to the WSGIDaemonProcess directive.  Otherwise you can fiddle sys.path in your wsgi script file.  If you are using Apache/mod_wsgi, there is lots of useful documentation and a pointer to their mailing list at http://code.google.com/p/modwsgi/


Peter Herndon

unread,
Sep 30, 2013, 1:45:16 PM9/30/13
to django...@googlegroups.com
I would suggest using separate virtual environments, each with gunicorn (http://gunicorn.org/) installed into the venv. Run gunicorn listening on a different port per venv, start all your venvs under supervisord (http://supervisor.org/), and proxy them behind nginx (http://wiki.nginx.org/).
> To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAB%2BAj0trj-MnweyArGTyfSy6SR0wdRLdwV_tYCXfOvA%3DgvOeGg%40mail.gmail.com.

carlos

unread,
Sep 30, 2013, 2:11:29 PM9/30/13
to django...@googlegroups.com
Hi, uwsgi is too good option http://uwsgi-docs.readthedocs.org/en/latest/ and nginx with virtualenv


Jasvir Singh

unread,
Sep 30, 2013, 11:15:37 PM9/30/13
to django...@googlegroups.com
On Mon, 30 Sep 2013, Jasvir Singh wrote:

> Is it possible to install multiple versions of Django on single ubuntu server.
> If yes, please tell me how to do this.
@all, thanks for their help but my requirement is to use multiple
versions of django on single server. I have to use it apache web server.
Here is the full scene.
I have django 1.4.2 installed on ubuntu server which uses apache.
There are several django based applications installed on it. All of
them are working on django 1.4.2 . But recently I have developed an
another application using django 1.5.2. Now I have to install that
application on server, but problem is that, I can not remove django
1.4.2 from server. For this purpose, I have tried virtual environment
using steps given in following link:
http://serverfault.com/questions/413879/how-can-i-run-two-django-versions-in-the-same-server

But when I wish to use to application, I have to switch on virtual
environment and start then django server. I want that app to run without
using django server.
Hope that I am able to explain the problem. If there is any confusion, please ask.


--
Jasvir Singh Grewal
Blog: jasvirsinghgrewal91.wordpress.com

:
####[ GNU/Linux One Stanza Tip (LOST) ]#######################

Sub : To randomly play mp3 songs from a directory LOST #243

mpg123 -z /path/to/mp3s/*.mp3
This will randomly play mp3 songs from the specified folder.

####[ajitabhpandey (at) users.sourceforge.net]################
:

Daniel Roseman

unread,
Oct 1, 2013, 5:02:04 AM10/1/13
to django...@googlegroups.com
On Tuesday, 1 October 2013 04:15:37 UTC+1, Jasvir Singh wrote:
On Mon, 30 Sep 2013, Jasvir Singh wrote:

> Is it possible to install multiple versions of Django on single ubuntu server.
> If yes, please tell me how to do this.
@all, thanks for their help but my requirement is to use multiple
versions of django on single server. I have to use it apache web server.
Here is the full scene.
I have django 1.4.2 installed on ubuntu server which uses apache.
There are several django based applications installed on it. All of
them are working on django 1.4.2 . But recently I have developed an
another application using django 1.5.2. Now I have to install that
application on server, but problem is that, I can not remove django
1.4.2 from server. For this purpose, I have tried virtual environment
using steps given in following link:
http://serverfault.com/questions/413879/how-can-i-run-two-django-versions-in-the-same-server

But when I wish to use to application, I have to switch on virtual
environment and start then django server. I want that app to run without
using django server.
Hope that I am able to explain the problem. If there is any confusion, please ask.


You've already been told upthread that it is simply not true that virtualenv is only for development. The second answer on that StackOverflow question gives a link to this page:
which explains exactly and in great detail how to configure virtualenv to work with Apache and mod_wsgi. You should read that, and come back if you have any specific questions.
--
DR. 

graeme

unread,
Oct 1, 2013, 8:49:56 AM10/1/13
to django...@googlegroups.com


On Tuesday, October 1, 2013 8:45:37 AM UTC+5:30, Jasvir Singh wrote:
On Mon, 30 Sep 2013, Jasvir Singh wrote:

I have django 1.4.2 installed on ubuntu server which uses apache.
There are several django based applications installed on it. All of
them are working on django 1.4.2 . But recently I have developed an
another application using django 1.5.2. Now I have to install that
application on server, but problem is that, I can not remove django

I assume you mean web apps with separate django-projects rather than applications in the same projects.... that would be a problem!

It is a simple (one line change) to your configuration - use the python executable in the virtualenv (.e.g path-to-virtualenv/bin/python) in place of usr/bin/python in your Apache config for the domain/url the django project is on.
Reply all
Reply to author
Forward
0 new messages