Skip to content

Upgrading

Esteban Castro Borsani edited this page Jul 27, 2015 · 31 revisions

Upgrading

From 0.3.0 to 0.4 (UNRELEASED)

Warning! Make a database backup before upgrading. Use the pg_dump command on PostgreSQL or mysqldump on MySQL. You can also create a backup running python manage.py dumpdata --indent=4 > database.json.

...

From 0.2+ to 0.3 (UNRELEASED)

Warning! Make a database backup before upgrading. Use the pg_dump command on PostgreSQL or mysqldump on MySQL. You can also create a backup running python manage.py dumpdata --indent=4 > database.json.

Note The project structure has been heavily changed, this release is just a bridge between the old structure and the new one. You won't be able to upgrade from 0.1 or 0.2 to 0.4, you will have to upgrade to 0.3 first and then you will be able to upgrade to 0.4+.

Required code changes:

Note This is required if you have actually installed v0.1+. If you have cloned the experimental branch, this is not required, skip it (install and migration steps are required).

  • Add AUTH_USER_MODEL = 'spirit.User' (or your custom user model) to settings.py (or your local settings).
  • If you have your own custom user model, remove the AbstractForumUser from the model inheritance.
  • If you have your own custom user model, change the spirit.models.AbstractUser import to django.contrib.auth.models.AbstractUser.

Install:

You can either clone the repository, download it from releases, or install it via PIP.

Option 1, PIP:

pip install -I django-spirit==0.3.0

Option 2, Clone:

git clone https://github.com/nitely/Spirit.git # if you installed Spirit by cloning skip this
cd Spirit
git checkout tags/v0.3.0 pip install -r requirements.txt # update the dependencies

Migration:

python manage.py migrate djconfig --fake-initial python manage.py migrate python manage.py collectstatic python manage.py rebuild_index --noinput # rebuild the search engine index

From 0.1+ to 0.2.1

Warning! Make a database backup before upgrading. Use the pg_dump command on PostgreSQL or mysqldump on MySQL. You can also create a backup running python manage.py dumpdata --indent=4 > database.json.

Install:

You can either clone the repository, download it from releases, or install it via PIP.

Option 1, PIP:

pip install -I django-spirit==0.2.1

Option 2, Clone:

git clone https://github.com/nitely/Spirit.git # if you installed Spirit by cloning skip this cd Spirit git checkout tags/v0.2.1 pip install -r requirements.txt # update the dependencies

Required code changes:

  • Change url(r'^', include(urls, namespace="spirit", app_name="spirit")), to url(r'^', include('spirit.urls')), in your urls.py.
  • The way settings used to import your local_settings.py has changed, check out the example provided.

Migration:

python manage.py migrate python manage.py collectstatic python manage.py rebuild_index --noinput # rebuild the search engine index

Clone this wiki locally