WebFaction
Community site: login faq
0
1

In the following the Python interpreter chosen determines the version of Django used:

app/myproject$ python2.4 manage.py shell
Python 2.4.3 (#1, Jun 18 2012, 08:55:31)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-52)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> import django; django.VERSION
(1, 2, 1, 'final', 0)

app/myproject$ python2.6 manage.py shell
Python 2.6.8 (unknown, Jun 11 2012, 21:58:54)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-52)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> import django; django.VERSION
(1, 2, 1, 'final', 0)
>>>

app/myproject$ python2.7 manage.py shell
Python 2.7.3 (default, Jun 11 2012, 22:26:11)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-52)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> import django; django.VERSION
(1, 2, 7, 'final', 0)

In app/lib/python2.7 in version 2.7 of Django. There are folders USERNAMRE/lib/python2.3,2.4,2.5, and 2.6 but no Django in them. It seems to me that python versions are setup on webfaction so that they look of "site-p[ackages' in various places. Presumbably first in the lib/python2.X folder where Python was called, then in the users lib/python2.X and finally in some default somewhere. If this is so then the same behaviour will apply for any Python package one might install. But is it?

BTW there was a support doc. on updating Django but it seems to have disappeared.

asked 18 Nov '12, 10:21

Peter Mott
17411
accept rate: 0%


The Python Search Path determines where packages are loaded. On WebFaction, the Python search path has been configured with two additions:

$HOME/lib/pythonX.Y is added to the Python search path for each version of Python.

$HOME/webapps/app/lib/pythonX.Y is added to the Python search path when the current working directory is $HOME/webapps/app/ or below, where app is the name of an application as it appears in the control panel.

To see the contents of your Python search path:

pythonX.Y -c "import sys; print sys.path"

You can add to your PYTHONPATH in your .bash_profile, command line, wsgi script, or httpd.conf.

As far as updating Django, you can use these instructions Using the Latest Django Trunk to update Django. Instead of checking out the latest SVN version, download the version that you are wanting to updated.

permanent link

answered 18 Nov '12, 12:13

timg ♦♦
1.3k4
accept rate: 30%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×909
×21
×9

question asked: 18 Nov '12, 10:21

question was seen: 2,055 times

last updated: 18 Nov '12, 12:13

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2020 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM