Upgrade 7.0 to 7.1

We’ve refactored tendenci by pulling the common addons into the core. As a result, T7.1 is not backwards compatible with T7.0. This guide helps you migrate from T7.0 to T7.1.

Step 1: Update 2 files in conf/

  • conf/local_settings.py

  • conf/local_urls.py

conf/local_settings.py:

Replace:

'committees',
'case_studies',
'donations',
'speakers',
'staff',
'studygroups',
'videos',
'testimonials',

With:

'tendenci.apps.committees',
'tendenci.apps.case_studies',
'tendenci.apps.donations',
'tendenci.apps.speakers',
'tendenci.apps.staff',
'tendenci.apps.studygroups',
'tendenci.apps.videos',
'tendenci.apps.testimonials',
'tendenci.apps.social_services',

conf/local_urls.py

Replace:

('^', include('committees.urls')),
('^', include('case_studies.urls')),
('^', include('donations.urls')),
('^', include('speakers.urls')),
('^', include('staff.urls')),
('^', include('studygroups.urls')),
('^', include('videos.urls')),
('^', include('testimonials.urls')),

With:

('^', include('tendenci.apps.committees.urls')),
('^', include('tendenci.apps.case_studies.urls')),
('^', include('tendenci.apps.donations.urls')),
('^', include('tendenci.apps.speakers.urls')),
('^', include('tendenci.apps.staff.urls')),
('^', include('tendenci.apps.studygroups.urls')),
('^', include('tendenci.apps.videos.urls')),
('^', include('tendenci.apps.testimonials.urls')),
('^', include('tendenci.apps.social_services.urls')),

Step 2: Update files in requirements/ directory

Add a file tendenci.txt and replace all files with the content in the directory https://github.com/tendenci/tendenci-project-template/tree/master/requirements

Step 3: Remove common addons modules from environment

pip uninstall -y tendenci-case-studies
pip uninstall -y tendenci-committees
pip uninstall -y tendenci-donations
pip uninstall -y tendenci-speakers
pip uninstall -y tendenci-staff
pip uninstall -y tendenci-studygroups
pip uninstall -y tendenci-videos

Step 4: Install requirements

pip install -r requirements.txt --upgrade

Note

If you encountered the error “no module ‘testimonials’ is installed” or similar, please check if ‘testimonials’ is removed from INSTALLED_APPS in conf/local_settings.py. If you encountered the error “bash: /usr/bin/pip: No such file or directory” or similar, please exit and re-enter the container.

Step 5: Run deploy

python deploy.py

If everything goes well, restart your site.

Troubleshooting Migrations

If you hit any errors on the migrations while running deploy.py, swbug it from the root of your python app with:

python manage.py showmigrations

Make a note of any of the migrations that are missing an “x” in the brackets. In this example for some reason the django migrations skipped the third migration in events.

events
 [X] 0001_initial
 [X] 0002_auto_20150804_1545
 [ ] 0003_registrant_salutation

whccih was resolved by faking the third migration in events like this:

python manage.py migrate events 0003 --fake

Of course realize that if your database structure is off and you fake that migratoin it won’t update your database table and will probably cause NGINX to just deliver of 502 error without logging anything helpful.