diff options
author | Étienne Loks <etienne.loks@peacefrogs.net> | 2013-06-15 12:45:25 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@peacefrogs.net> | 2013-06-15 12:45:25 +0200 |
commit | aae0f5143ea6bb40459a4bc5a5b738d7852a6ea3 (patch) | |
tree | 5c17c2dd872cfe3eb3e91aa4b160892f42beff5d /docs/source/upgrade.rst | |
parent | 7d9b6fca686e018a476155834b75be951a23fd3d (diff) | |
download | Papillon-aae0f5143ea6bb40459a4bc5a5b738d7852a6ea3.tar.bz2 Papillon-aae0f5143ea6bb40459a4bc5a5b738d7852a6ea3.zip |
Upgrade source code to work with Django 1.4v0.4.0
* cleaner way to manage settings.py
* fix feeds for Django 1.
* fix settinsg for Django 1.4
* update documentation
Diffstat (limited to 'docs/source/upgrade.rst')
-rw-r--r-- | docs/source/upgrade.rst | 78 |
1 files changed, 52 insertions, 26 deletions
diff --git a/docs/source/upgrade.rst b/docs/source/upgrade.rst index 24f7d44..d049a4b 100644 --- a/docs/source/upgrade.rst +++ b/docs/source/upgrade.rst @@ -8,12 +8,12 @@ Upgrade :Date: 2011-10-25 :Copyright: CC-BY 3.0 +Preliminary +----------- + This document presents the upgrade from one version of Papillon to another. Instructions are given for Debian and bash but they are easy to adapt to other distribution and other shells. -From version 0.2 (and prior) to 0.3 ------------------------------------ - First of all copy the installation path, the config files and your database. Then you'll be able to rollback if there is any problem. @@ -21,36 +21,59 @@ Disable your installation in Apache *********************************** :: - $ sudo a2dissite papillon - $ sudo /etc/init.d/apache2 reload + sudo a2dissite papillon + sudo /etc/init.d/apache2 reload Upgrade sources *************** Get the new sources. Extract the tarball (from the download `directory <http://www.peacefrogs.net/download/>`_) or clone the git repository in a temporary directory:: - $ cd /tmp/ - $ git clone git://www.peacefrogs.net/git/papillon - $ cd papillon - $ git tag -l # list tagged versions - $ git checkout v0.3.0 # checkout the desired version + cd /tmp/ + git clone git://www.peacefrogs.net/git/papillon + cd papillon + git tag -l # list tagged versions + git checkout v0.4.0 # checkout the desired version Copy updated files to your installation (be careful to put trailing slash):: - $ PAPILLON_PATH=/var/local/django/papillon/ - $ sudo rsync -raP /tmp/papillon/ $PAPILLON_PATH + PAPILLON_PATH=/var/local/django/papillon/ + sudo rsync -raP /tmp/papillon/ $PAPILLON_PATH As the Git is now used you can remove (if any) Subversion directory in your new installation:: - $ cd $PAPILLON_PATH - $ sudo find . -name ".svn" -exec rm -rf {} \; + cd $PAPILLON_PATH + sudo find . -name ".svn" -exec rm -rf {} \; + +From version 0.3 to 0.4 +----------------------- + +New dependencies +**************** + +Papillon needs now at least Django version 1.4. Upgrade your version of Django. + +New settings management +*********************** + +Settings are not managed the same way. To manage properly the upgrade follow +theses steps (in the project directory): + +* Copy local_settings.py.sample to local_settings.py. +* Report your old configuration to local_settings.py (put only the fields that + defers from the new settings.py). +* Be careful: database engines have changed (the sample give you the new path to + sqlite engine). + +From version 0.2 (and prior) to 0.3 +----------------------------------- New dependencies **************** In order to simplify future database evolution `django-south <http://south.aeracode.org/>`_ is now used. To install it on a debian Squeeze:: - $ sudo aptitude install python-django-south + sudo aptitude install python-django-south "settings.py" changes @@ -58,12 +81,12 @@ In order to simplify future database evolution `django-south <http://south.aerac Many changes have to be made in settings.py. -Change any occurence of ROOT_PATH to PROJECT_PATH:: +Change any occurrence of ROOT_PATH to PROJECT_PATH:: - $ cd $PAPILLON_PATH - $ sed -i 's/ROOT_PATH/PROJECT_PATH/g' papillon/settings.py + cd $PAPILLON_PATH + sed -i 's/ROOT_PATH/PROJECT_PATH/g' papillon/settings.py -Change the manualy set definition of the project path by the lines:: +Change the manually set definition of the project path by the lines:: import os.path PROJECT_PATH = os.path.dirname(os.path.abspath(__file__)) @@ -136,19 +159,22 @@ Update database *************** :: - $ cd $PAPILLON_PATH - $ cd papillon - $ ./manage.py syncdb - $ ./manage.py migrate polls --fake + cd $PAPILLON_PATH + cd papillon + ./manage.py syncdb + ./manage.py migrate polls --fake Regeneration of translations **************************** :: - $ cd $PAPILLON_PATH - $ cd papillon - $ ./manage.py compilemessages -l fr + cd $PAPILLON_PATH + cd papillon + ./manage.py compilemessages -l fr + +Finish your update +------------------ Enable your new installation in Apache ************************************** |