diff options
author | Stephen Finucane <stephenfinucane@hotmail.com> | 2015-04-07 22:20:48 +0100 |
---|---|---|
committer | Jeremy Kerr <jk@ozlabs.org> | 2015-05-03 13:46:52 +0800 |
commit | a48f76a2d3a98c21d4b37f19cf84073e77db55c8 (patch) | |
tree | c91e98b4f522f0ec8072d19d89a3bae64040a2e0 /apps/patchwork/filters.py | |
parent | 3d74843a8982926ab4ce310ed937a4f41ee36810 (diff) | |
download | patchwork-a48f76a2d3a98c21d4b37f19cf84073e77db55c8.tar.bz2 patchwork-a48f76a2d3a98c21d4b37f19cf84073e77db55c8.tar.xz |
Resolve removed 'AUTH_PROFILE_MODULE' setting
The 'AUTH_PROFILE_MODULE' setting, and the 'get_profile()' method on
the 'User' model are removed in Django 1.7. This causes errors when
using Patchwork with Django 1.7+.
There are three changes necessary:
* Replace profile model's 'ForeignKey' with a 'OneToOneField'
* Remove all 'get_profile()' calls
* Delete 'AUTH_PROFILE_MODULE' settings from 'settings.py'
These changes are discussed here:
http://deathofagremmie.com/2014/05/24/retiring-get-profile-and-auth-profile-module/
Django 1.6 also introduces two other notable changes:
* The 'XViewMiddleware' module has been moved
* A new test runner has been introduced
It is not possible to fix these issues without breaking compatibility
with Django 1.5. As a result they have been ignored and must be
resolved in a future release.
Signed-off-by: Stephen Finucane <stephenfinucane@hotmail.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'apps/patchwork/filters.py')
-rw-r--r-- | apps/patchwork/filters.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/patchwork/filters.py b/apps/patchwork/filters.py index 8323fe8..8c9690e 100644 --- a/apps/patchwork/filters.py +++ b/apps/patchwork/filters.py @@ -350,11 +350,11 @@ class DelegateFilter(Filter): def condition(self): if self.delegate: - return self.delegate.get_profile().name() + return self.delegate.profile.name() return self.no_delegate_str def _form(self): - delegates = User.objects.filter(userprofile__maintainer_projects = + delegates = User.objects.filter(profile__maintainer_projects = self.filters.project) str = '<select name="delegate">' @@ -378,7 +378,7 @@ class DelegateFilter(Filter): selected = ' selected' str += '<option %s value="%s">%s</option>' % (selected, - d.id, d.get_profile().name()) + d.id, d.profile.name()) str += '</select>' return mark_safe(str) |