WebFaction
Community site: login faq
0
2

What's the recommended way to update one's Django app? I came across a thread on the old forums that suggested creating a new app with the desired version, copying all the files over and then pointing the site to that new app, but with the change from Python 2.5 to Python 2.6 (I'm upgrading from Django 1.0 to 1.2), it seems like something more sophisticated is required.

Thoughts?

asked 24 Oct '10, 22:50

barsoomcore
613
accept rate: 0%


You can also use easy_install to upgrade:

 PYTHONPATH=$HOME/webapps/<app_name>/lib/python2.5/ easy_install-2.5 --install-dir=$HOME/webapps/<app_name>/lib/python2.5 --script-dir=$HOME/webapps/<app_name>/bin -U django

(replacing <app_name> with the name of your app)

-U being the option for Upgrade.

Remember to restart the apache server that server your Django app

permanent link

answered 25 Oct '10, 03:17

DavidR
712
accept rate: 100%

Thanks, David. The only piece I seemed to need to figure out was to extract the "django" directory from the resulting egg file and put it at "webapps/<app_name>/lib/python2.5/". Once that was done, this worked great. Thanks again!

(25 Oct '10, 14:42) barsoomcore

This worked as far as it went, but my applications list in the webfaction panel still warns me that I'm on Django 1.1.1, which is "INSECURE".

(12 Aug '11, 19:17) amacdougall

The Control Panel is unable to inspect your actual application installation to know what version is really being run; this is more as a quick reference of the installed app types. If you have manually updated your application, you can ignore the Control Panel version information.

(12 Aug '11, 19:28) ryans ♦♦

If your application code can work with Django 1.2, then all you need to do is update the Django library that came with your app. You can do the following:

  1. Rename the 'django' folder (e.g. to 'django_old')
  2. Download the new Django version (as an archive, or via subversion) and place (or link) the 'django' module inside the same folder where 'django_old' is located
  3. Restart the Apache server that serves your Django app
permanent link

answered 25 Oct '10, 02:37

tie
1.4k13
accept rate: 44%

edited 25 Oct '10, 02:40

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
×337
×25

question asked: 24 Oct '10, 22:50

question was seen: 9,474 times

last updated: 12 Aug '11, 19:28

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 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