howto lock django version to 1.7 on ubuntu?

16 views
Skip to first unread message

Charles Cossé

unread,
Sep 30, 2015, 12:05:47 PM9/30/15
to Mezzanine Users
Hi, I'm trying to use django-schedular with Mezzanine but default Mezzanine installed Django-1.8.4 and pretty sure now that I need Django-1.7 for django-schedular.  Not being overly guru-istic with Ubuntu, how do you force Ubuntu to use Django-1.7, and prevent Mezzanine from upgrading to 1.8?  Thanks,
Charles

Eduardo Rivas

unread,
Sep 30, 2015, 12:10:55 PM9/30/15
to mezzani...@googlegroups.com
Best way is to use a virtualenv and pin your Django version in
requirements.txt.

It's highly recommend you develop all python projects in separate
virtual environments. This is a great guide, and also explains how to
pin (freeze) requirements:
http://docs.python-guide.org/en/latest/dev/virtualenvs/

If you still want to go with the system Python, you can force the
version of Django like this:

sudo pip install -U "django<1.8"

Charles Cossé

unread,
Sep 30, 2015, 12:13:27 PM9/30/15
to mezzani...@googlegroups.com

Thank you, will try the latter after lunch.  Maybe the former, too, at this point.
-C

--
You received this message because you are subscribed to a topic in the Google Groups "Mezzanine Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mezzanine-users/G19S2vxpJJQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mezzanine-use...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Charles Cossé

unread,
Sep 30, 2015, 1:30:49 PM9/30/15
to mezzani...@googlegroups.com
I am running 2x virtual hosts via apache/wsgi/django ... if i hide them away in venvs how do i get them back online?  TIA, Charles

Eduardo Rivas

unread,
Sep 30, 2015, 5:39:30 PM9/30/15
to mezzani...@googlegroups.com
You only need to tell Apache to use the virtualenv's Python instead of
the system's Python.

"/usr/bin/python" becomes "/path/to/your-virtualenv/bin/python".

Charles Cossé

unread,
Sep 30, 2015, 6:51:13 PM9/30/15
to mezzani...@googlegroups.com
Thanks, I did do some further reading but glad to hear it simply as you put it.

On Wed, Sep 30, 2015 at 5:39 PM, Eduardo Rivas <jeriva...@gmail.com> wrote:
You only need to tell Apache to use the virtualenv's Python instead of the system's Python.

"/usr/bin/python" becomes "/path/to/your-virtualenv/bin/python".
Reply all
Reply to author
Forward
0 new messages