I have an app that was set up using Python 2.5 / Django 1.1. I’d like to upgrade Django to the latest stable release (1.2.4), but that requires Python 2.6. How can I get this app to use Python 2.6? Thanks! -- David asked 30 Jan '11, 19:35 davidcairns |
Our newest apache builds use that version of Django and Python. The easiest would be to create a new blank Django application with Django 1.2.4 and Python 2.6 and migrate your app to it. Directly converting it would be difficult and would still require rebuilding apache and its libraries. You could leave your current app online and bind this one to a temporary URL while you migrate your code. answered 30 Jan '11, 19:42 johns I would appreciate a great deal more detail around this, particularly the "migrate your app" bit. What is the procedure there? Thanks so much.
(16 Apr '11, 19:28)
barsoomcore
1
A typical django webapp looks something like this:
The "Django-specific" part of this application directory is the "myproject" folder in here. This is sometimes called the "Django app" or "app" when used in context with Django. For the sake of clarity, consider the entire "$HOME/webapps/django" folder to be the "webapp". This is what the Control Panel creates when you add a new Django web application via one-click automated installer. You can generally create a new updated Django webapp from the Control Panel. Then, you will have another webapp available:
Then, just move the "old" myproject/ and myproject.wsgi files to the new application. This is "copying your old Django application to the new webapp". The "migration" part suggests that you may then need to update some configuration settings, install required python libraries, etc, until the application works. All of this is application-specific so there really isn't a particular guide to doing it.
(16 Apr '11, 19:47)
ryans ♦♦
Thanks! For reference (at least my own next time I have to do this): I have a custom app name, and thus custom directory and .wsgi file names. So I had to edit references to the old django app directory so they pointed to the new django app directory, in the .wsgi and settings.py files. I also had to update the httpd.conf in new_django_app/apache2/conf/ so that it pointed at the custom .wsgi file. Then I had to install libraries in ~/lib/python_new_version Thanks again for the help.
(22 Apr '11, 18:59)
barsoomcore
Glad to help! And thanks for elaborating on your migration configuration updates, as well :)
(22 Apr '11, 19:43)
ryans ♦♦
|