Re: Multiple versions of Django

2013-10-01 Thread graeme


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.

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@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/9b33938a-e5ec-4e2b-9b6c-261ddce739aa%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Multiple versions of Django

2013-10-01 Thread Daniel Roseman
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:
https://code.google.com/p/modwsgi/wiki/VirtualEnvironments
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. 

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@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/545564db-8ecc-4557-a7d3-2cac53ab1aac%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Multiple versions of Django

2013-09-30 Thread Jasvir Singh
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 directoryLOST #243

mpg123 -z /path/to/mp3s/*.mp3
This will randomly play mp3 songs from the specified folder.
 
[ajitabhpandey (at) users.sourceforge.net]
:

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


Re: Multiple versions of Django

2013-09-30 Thread carlos
Hi, uwsgi is too good option http://uwsgi-docs.readthedocs.org/en/latest/ and
nginx with virtualenv


On Mon, Sep 30, 2013 at 11:45 AM, Peter Herndon  wrote:

> 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/).
>
> On Sep 30, 2013, at 11:48 AM, Bill Freeman  wrote:
>
> > 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/
> >
> >
> > On Mon, Sep 30, 2013 at 11:30 AM, Gerald Klein  wrote:
> > Sorry please disregard I didn't read far enough into your message
> >
> >
> > On Mon, Sep 30, 2013 at 10:25 AM, 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.
> > 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/
> >
> > --
> > 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+unsubscr...@googlegroups.com.
> > To post to this group, send email to django-users@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
> > contac...@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
> >
> >
> > --
> > 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+unsubscr...@googlegroups.com.
> > To post to this group, send email to django-users@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/CAP8NtCw5tr3%3Dt0k6H2CUVGfaNkX6jFhArh6E1iz32s412%3DjL0Q%40mail.gmail.com
> .
> >
> > For more options, visit https://groups.google.com/groups/opt_out.
> >
> >
> > --
> > 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+unsubscr...@googlegroups.com.
> > To post to this group, send email to django-users@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/CAB%2BAj0trj-MnweyArGTyfSy6SR0wdRLdwV_tYCXfOvA%3DgvOeGg%40mail.gmail.com
> .
> > For more options, visit https://groups.google.com/groups/opt_out.
>
> --
> 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+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@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/78E9816C-755

Re: Multiple versions of Django

2013-09-30 Thread Peter Herndon
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/).

On Sep 30, 2013, at 11:48 AM, Bill Freeman  wrote:

> 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/
> 
> 
> On Mon, Sep 30, 2013 at 11:30 AM, Gerald Klein  wrote:
> Sorry please disregard I didn't read far enough into your message
> 
> 
> On Mon, Sep 30, 2013 at 10:25 AM, 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.
> 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/
> 
> --
> 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+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@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
> contac...@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
> 
> 
> -- 
> 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+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@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/CAP8NtCw5tr3%3Dt0k6H2CUVGfaNkX6jFhArh6E1iz32s412%3DjL0Q%40mail.gmail.com.
> 
> For more options, visit https://groups.google.com/groups/opt_out.
> 
> 
> -- 
> 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+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@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/CAB%2BAj0trj-MnweyArGTyfSy6SR0wdRLdwV_tYCXfOvA%3DgvOeGg%40mail.gmail.com.
> For more options, visit https://groups.google.com/groups/opt_out.

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@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/78E9816C-7555-4A0C-928D-F9D346463987%40gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Multiple versions of Django

2013-09-30 Thread Bill Freeman
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/


On Mon, Sep 30, 2013 at 11:30 AM, Gerald Klein  wrote:

> Sorry please disregard I didn't read far enough into your message
>
>
> On Mon, Sep 30, 2013 at 10:25 AM, 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.
>> 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/
>>
>> --
>> 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+unsubscr...@googlegroups.com.
>> To post to this group, send email to django-users@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
>
> contac...@geraldklein.com
>
> www.geraldklein.com <http://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
>
>  --
> 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+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@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/CAP8NtCw5tr3%3Dt0k6H2CUVGfaNkX6jFhArh6E1iz32s412%3DjL0Q%40mail.gmail.com
> .
>
> For more options, visit https://groups.google.com/groups/opt_out.
>

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


Re: Multiple versions of Django

2013-09-30 Thread Gerald Klein
Sorry please disregard I didn't read far enough into your message


On Mon, Sep 30, 2013 at 10:25 AM, 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.
> 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/
>
> --
> 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+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@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

contac...@geraldklein.com

www.geraldklein.com <http://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

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


Re: Multiple versions of Django

2013-09-30 Thread Gerald Klein
Yes, use something like VirtualEnv, it allows you to separate website
environments and requirements and it has nice additionals to help you
publish


On Mon, Sep 30, 2013 at 10:25 AM, 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.
> 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/
>
> --
> 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+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@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

contac...@geraldklein.com

www.geraldklein.com <http://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

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


Multiple versions of Django

2013-09-30 Thread Jasvir Singh
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/

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@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.


Re: Running multiple versions of Django on the same machine

2009-12-22 Thread Shawn Milochik
Use virtualenv. All the cool kids are doing it.

You will love it -- it does what you want and more, and I use it on my  
Mac with no worries.

Shawn

Sent from my iPhone

On Dec 22, 2009, at 6:42 PM, Alex Fink  wrote:

> Hi all,
>
> I'm developing for several different Django projects, one of which has
> yet to move from Django 1.0 to 1.1. I'd like to move some of the
> projects to 1.1, but keep one of the projects on 1.0. Maybe this is  
> easy
> to do, but I didn't know the right search terms to figure out what I'm
> trying to do. The production servers are on two different machines, so
> that's taken care of, but all the development is done on the same (my)
> computer and I need to be able to develop and test for both projects.
> Does this make any sense? Is it possible to do this?
>
> I am on Mac OS X 10.5, Python 2.5.
>
> Thank you,
> Alex
>
> --
>
> 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 
> .
>
>

--

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.




Running multiple versions of Django on the same machine

2009-12-22 Thread Alex Fink
Hi all,

I'm developing for several different Django projects, one of which has 
yet to move from Django 1.0 to 1.1. I'd like to move some of the 
projects to 1.1, but keep one of the projects on 1.0. Maybe this is easy 
to do, but I didn't know the right search terms to figure out what I'm 
trying to do. The production servers are on two different machines, so 
that's taken care of, but all the development is done on the same (my) 
computer and I need to be able to develop and test for both projects. 
Does this make any sense? Is it possible to do this?

I am on Mac OS X 10.5, Python 2.5.

Thank you,
Alex

--

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.




Re: Running Multiple Versions of Django (91 and trunk) on the same machine

2006-09-25 Thread [EMAIL PROTECTED]

Thanks to all who offered their suggestions. I'll document what worked
for me:

With a single installation of Python 2.4, I purposely did not symlink
or install Django in the site-packages folder.

I took out all references to PYTHONPATH and PYTHONBIN from my
.bash_login file.

I created a shell script to wrap manage.py:

#!/bin/bash
export PYTHONPATH=/core/django91_src
export DJANGO_SETTINGS_MODULE=ellington.settings
python manage.py runserver 3000

and with my 95 apps:

#!/bin/bash
export PYTHONPATH=/code/django95_src
export DJANGO_SETTINGS_MODULE=test.settings
python manage.py runserver 3000

As soon as I get it working with MOD_PYTHON, I'll document the same
here to help anyone who might get stuck where I did.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Running Multiple Versions of Django (91 and trunk) on the same machine

2006-09-25 Thread Graham Dumpleton

[EMAIL PROTECTED] wrote:
> I'm trying to run multiple versions of Django on OS X to support
> applications written under different code. After searching ad nauseum,
> I think I'm very close, but I can't get it working. I'd like to be able
> to choose the Django version, either through the development web
> server, or through mod_python.
>
> I pulled the trunk and 91 versions of Django into these folders:
>
> /code/django_91src/
> /code/django_95src/
>
> I put this in my .bash_login:
>
> export PYTHONPATH="/code/django91_src/django"
> export PYTHONBIN="/code/django91_src/django/bin"
> export
> PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/opt/local/bin:/opt/local/sbin:$PYTHONBIN:$PATH"
>
> I can get it to work if I put a symlink called 'django' in my
> site-packages directory (below), but if it's not there, I can't 'import
> django' from the Python shell:
>
> /opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages
>
>
> So here's my question: can I make Django work if I don't have a symlink
> in my site-packages directory? Creating the symlink makes me have to
> choose which version (91 or 95) I want to point to, which seems to
> defeat what I'm trying to do here.
>
> Note: I didn't do a "python setup.py install" from either of the
> versions in /code. That seemed to install the egg to site-packages.
>
> I'm completely frustrated and don't know how to move forward. Any
> advice is extremely appreciated!

When using mod_python, it is possible to associate different parts of
the
URL namespace with different Python interpreter instances. Thus, you
should be able to run two different versions of Django under the one
web
server by hosting them under different URLs and then using the
directive
PythonInterpreter directive to separate them. For each instance, you
will
need to set the PythonPath directive to reference where the different
installations of Django are installed.

For example, something like:


PythonInterpreter django.mysite1
SetHandler python-program
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE mysite.settings
PythonDebug On
PythonPath "['/path/to/project','/path/to/django1'] + sys.path"



PythonInterpreter django.mysite2
SetHandler python-program
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE mysite.settings
PythonDebug On
PythonPath "['/path/to/project','/path/to/django2'] + sys.path"


Because they run in different Python interpreter instances, they
should not interfere with each other and doesn't matter that different
versions of same modules are used by each.

Graham


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Running Multiple Versions of Django (91 and trunk) on the same machine

2006-09-25 Thread Eric Walstad

[EMAIL PROTECTED] wrote:
> I put this in my .bash_login:
> 
> export PYTHONPATH="/code/django91_src/django"
> export PYTHONBIN="/code/django91_src/django/bin"
> export
> PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/opt/local/bin:/opt/local/sbin:$PYTHONBIN:$PATH"

I use a couple bash aliases to quickly switch back and forth between 
django versions.  Note that DJANGO_SETTINGS_MODULE points to the 
settings.py file that is somewhere on my python path.  The following two 
lines are in my ~/.bashrc file:

alias use91='export PYTHONPATH=/path/to/django91;export 
DJANGO_SETTINGS_MODULE=foo.django.settings && 
/path/to/django91/django/bin/django-admin.py runserver'

alias usetrunk='export PYTHONPATH=/path/to/django_trunk;export 
DJANGO_SETTINGS_MODULE=bar.settings && 
/path/to/django_trunk/django/bin/django-admin.py runserver'


When I need to test my Sargasso app, I start the development server from 
a bash shell like this:
$ use91

To test my trunk app, I start the dev server like this:
$ usetrunk

I hope that helps.

Eric.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Running Multiple Versions of Django (91 and trunk) on the same machine

2006-09-25 Thread Maximillian Dornseif

To test different versions of Python packages I usually use a
brute-force approach: HAving 2 complete python installations. On a  Mac
there is  one default python  2.3 installation at /usr/bin/python.
Since I prefer 2.4 I have used Darwinpoorts  to install a second Python
Instance living at /opt/local/bin/python.

When installing packages I can choose where to install them by
selecting the python interpreter.
/opt/local/bin/python setup.py install
installs packages to /opt/local/lib/python2.4/site-packages/ while
/usr/bin/python setup.py install
installs packages to
/Library/Frameworks/Python.framework/Libraries/python2.4/
site-packages/

I have used this to install Django 0.91 and Django  current and by
calling
/opt/local/bin/python manage.py runserver
or 
/usr/bin/python manage.py runserver
I can choose which one to use.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Running Multiple Versions of Django (91 and trunk) on the same machine

2006-09-25 Thread [EMAIL PROTECTED]

I'm trying to run multiple versions of Django on OS X to support
applications written under different code. After searching ad nauseum,
I think I'm very close, but I can't get it working. I'd like to be able
to choose the Django version, either through the development web
server, or through mod_python.

I pulled the trunk and 91 versions of Django into these folders:

/code/django_91src/
/code/django_95src/

I put this in my .bash_login:

export PYTHONPATH="/code/django91_src/django"
export PYTHONBIN="/code/django91_src/django/bin"
export
PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/opt/local/bin:/opt/local/sbin:$PYTHONBIN:$PATH"

I can get it to work if I put a symlink called 'django' in my
site-packages directory (below), but if it's not there, I can't 'import
django' from the Python shell:

/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages


So here's my question: can I make Django work if I don't have a symlink
in my site-packages directory? Creating the symlink makes me have to
choose which version (91 or 95) I want to point to, which seems to
defeat what I'm trying to do here.

Note: I didn't do a "python setup.py install" from either of the
versions in /code. That seemed to install the egg to site-packages.

I'm completely frustrated and don't know how to move forward. Any
advice is extremely appreciated!


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---