Merge lp:~danilo/maas/django-upgrade-method-fixes into lp:~maas-committers/maas/trunk
Status: | Merged |
---|---|
Approved by: | Данило Шеган |
Approved revision: | no longer in the source branch. |
Merged at revision: | 6089 |
Proposed branch: | lp:~danilo/maas/django-upgrade-method-fixes |
Merge into: | lp:~maas-committers/maas/trunk |
Diff against target: |
522 lines (+85/-91) 17 files modified
docs/development/notifications.rst (+1/-1) src/apiclient/testing/django.py (+6/-1) src/maasserver/api/doc_handler.py (+4/-6) src/maasserver/api/tests/test_doc.py (+6/-7) src/maasserver/djangosettings/settings.py (+29/-27) src/maasserver/forms/__init__.py (+0/-2) src/maasserver/models/largefile.py (+3/-2) src/maasserver/models/tests/test_blockdevice.py (+4/-4) src/maasserver/models/tests/test_physicalblockdevice.py (+8/-10) src/maasserver/urls.py (+6/-2) src/maasserver/utils/__init__.py (+1/-4) src/maasserver/utils/tests/test_views.py (+1/-2) src/maasserver/utils/views.py (+1/-0) src/maasserver/views/account.py (+3/-7) src/maasserver/views/prefs.py (+5/-6) src/maasserver/views/settings.py (+4/-5) src/maasserver/views/tests/test_general.py (+3/-5) |
To merge this branch: | bzr merge lp:~danilo/maas/django-upgrade-method-fixes |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Mike Pontillo (community) | Approve | ||
Review via email: mp+325747@code.launchpad.net |
Commit message
Stop using settings, methods, functions and attributes that have been dropped between Django 1.8 and 1.11, fix up issues in our code that surfaced since 1.11 is stricter.
Description of the change
Django has gotten stricter between 1.8 and 1.11, which highlighted a few things in our code:
- we were passing path to BlockDevice/
- PackageRepository has long lost the "description" field, yet Django silently ignored us setting it in the forms
The rest of the changes are basically following the suggested upgrade paths for Django code.
Dependencies
============
To test with Django 1.11, you need to add the following two PPAs:
sudo apt-add-repository ppa:danilo/
sudo apt-add-repository ppa:danilo/
Looks good. One minor nit below that I won't block you on.
I tested this branch with my local MAAS (on Django 1.8), so I'm pretty sure this doesn't cause a regression.