← Back to team overview

widelands-dev team mailing list archive

[Merge] lp:~widelands-dev/widelands-website/django1_11 into lp:widelands-website

 

The proposal to merge lp:~widelands-dev/widelands-website/django1_11 into lp:widelands-website has been updated.

Description changed to:

Major update of the website code to Django 1.11.12. I have gone through all release notes form Django 1.8 until Django 1.11.

- Added migrations for wlscreens
- Fixed creation of noticetypes by converting signals post_syncdb to post_migrate. This is done by applying some files called 'apps.py'. This makes it also possible to have our own notification types for django_messages.
- Replaced linaro-django-pagination (outdated, not maintained) with dj-pagination
- Removed using of context_instance (deprecated since Django 1.8)
- Added 'options' for setting DATABASES when using mysql version > 5.6
- updated third party app django-registration
- Replaced setting MIDDLE_CLASSES with MIDDLEWARE
- Added setting PASSWORD_HASHERS which is needed because some old password hashers are removed. Doing so old password stored with an old hasher will be converted automatically.
- removed some unused code
- moved mainpage urls from urls.py to mainpage/urls.py
- Removed app 'tracking' and replaced it with a single middleware, including some own modifications
- Fixes getting a list of usernames for JavaScript. This may need a review from a security perspective.

How to get this in:

Be sure there are no mails awaiting for sending. Just call 

./manage.py emit_notices

before the update.

1.  activate the virtualenvironment
2.  shut down the website (and activate the maintenance view)
3.  make a backup of the database
4.  run 'pip install -U pip setuptools'
5.  merge this branch
6.  There will be a conflict: Delete the folder 'tracking' and 'resolve --all'
7.  delete remaining '*.pyc' files
8.  run 'pip install -R pip_requirements.txt'
9.  Modify local_settings.py and add the DATABASE 'options:' like in local_settings.py.sample
10.  run './manage.py migrate --fake-initial' (faking initial because of wlscreens)
11. deactivate maintenance view and start the website again
12. pray

If all is working:
13. Commit the changes and push
14. optionally drop the database tables related to tracking called: tracking_bannedip, tracking_untrackeduseragent, tracking_visitor

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands-website/django1_11/+merge/343065
-- 
Your team Widelands Developers is subscribed to branch lp:widelands-website.


References