-
-
Notifications
You must be signed in to change notification settings - Fork 332
Upgrading
Do not skip minor versions! If you are on Spirit v0.1, upgrade to v0.2, then to v0.3, and then to v0.4. You may skip patch versions. Check the changelog for more information about what changed from one version to the next one.
Warning!
Make a database backup before upgrading to avoid data loss, you have been warned. Use thepg_dump
command on PostgreSQL ormysqldump
on MySQL. You can also create a backup runningpython manage.py dumpdata --indent=4 > database.json
.
You may want to backup yourmedia
folder too.
You can either clone the repository or install it via PIP.
Option 1, PIP:
$ pip install -I django-spirit==0.4.x # replace the x by the latest patch version
Option 2, Clone:
$ git clone https://github.com/nitely/Spirit.git # if already cloned skip this
$ cd Spirit
$ git fetch
$ git checkout origin/v0.4.x
$ git reset --hard origin/v0.4.x
$ pip install -r requirements.txt # update the dependencies
$ python manage.py migrate
$ python manage.py collectstatic
$ python manage.py rebuild_index --noinput # rebuild the search engine index
$ python manage.py createcachetable
Start up Spirit and test everything is ok.
Warning!
Make a database backup before upgrading to avoid data loss, you have been warned. Use thepg_dump
command on PostgreSQL ormysqldump
on MySQL. You can also create a backup runningpython manage.py dumpdata --indent=4 > database.json
.
You may want to backup yourmedia
folder too.
.
Note
You won't be able to upgrade from 0.2 to 0.4, you will have to upgrade to 0.3 first and then upgrade to 0.4+.
- Change
AUTH_USER_MODEL = 'spirit.User'
toAUTH_USER_MODEL = 'spirit_user.User'
insettings.py
(or your local settings). Skip this if you installed Spirit from the experimental branch.
You can either clone the repository or install it via PIP.
Option 1, PIP:
$ pip install -I django-spirit==0.4.x # replace the x by the latest patch version
Option 2, Clone:
$ git clone https://github.com/nitely/Spirit.git # if already cloned skip this
$ cd Spirit
$ git fetch
$ git checkout origin/v0.4.x
$ git reset --hard origin/v0.4.x
$ pip install -r requirements.txt # update the dependencies
$ python manage.py migrate --fake-initial
$ python manage.py collectstatic
$ python manage.py rebuild_index --noinput # rebuild the search engine index
Start up Spirit and test everything is ok.
Warning!
Make a database backup before upgrading to avoid data loss, you have been warned. Use thepg_dump
command on PostgreSQL ormysqldump
on MySQL. You can also create a backup runningpython manage.py dumpdata --indent=4 > database.json
.
You may want to backup yourmedia
folder too.
.
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 upgrade to 0.4+.
Note
This is required if you have actually installed v0.1+. If you have cloned theexperimental
branch, this is not required, skip it (install and migration steps are required).
- Add
AUTH_USER_MODEL = 'spirit.User'
(or your custom user model) tosettings.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 todjango.contrib.auth.models.AbstractUser
.
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 already cloned skip this
$ cd Spirit
$ git fetch
$ git checkout tags/v0.3.0
$ git reset --hard tags/v0.3.0
$ pip install -r requirements.txt # update the dependencies
$ python manage.py migrate --fake-initial
$ python manage.py collectstatic
$ python manage.py rebuild_index --noinput # rebuild the search engine index
Start up Spirit and test everything is ok.
Warning!
Make a database backup before upgrading to avoid data loss, you have been warned. Use thepg_dump
command on PostgreSQL ormysqldump
on MySQL. You can also create a backup runningpython manage.py dumpdata --indent=4 > database.json
.
You may want to backup yourmedia
folder too.
- Change
url(r'^', include(urls, namespace="spirit", app_name="spirit"))
, tourl(r'^', include('spirit.urls'))
, in yoururls.py
. - The way settings used to import your local_settings.py has changed, check out the example provided.
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 already cloned skip this
$ cd Spirit
$ git fetch
$ git checkout tags/v0.2.1
$ git reset --hard tags/v0.2.1
$ pip install -r requirements.txt # update the dependencies
$ python manage.py migrate --fake-initial
$ python manage.py collectstatic
$ python manage.py rebuild_index --noinput # rebuild the search engine index
Start up Spirit and test everything is ok.