[PATCH v3] Resolve removed 'AUTH_PROFILE_MODULE' setting

Damien Lespiau damien.lespiau at intel.com
Wed Jan 14 01:58:05 AEDT 2015


On Sun, Nov 23, 2014 at 01:48:21PM +0000, Stephen Finucane wrote:
> 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:

[...]

>  * Remove all 'get_profile()' calls

[...]

I'm guessing we'd want to change those as well?

$ git grep get_profile
templates/base.html:      <span class="badge">{{ user.get_profile.n_todo_patches }}</span></a>
templates/patchwork/patch.html:   <td>{{ patch.delegate.get_profile.name }}</td>
templates/patchwork/profile.html:{% if user.get_profile.maintainer_projects.count %}
templates/patchwork/profile.html:{% for project in user.get_profile.maintainer_projects.all %}
templates/patchwork/profile.html:{% if user.get_profile.contributor_projects.count %}
templates/patchwork/profile.html:{% for project in user.get_profile.contributor_projects.all %}
templates/patchwork/profile.html:{% if user.get_profile.n_todo_patches %}
templates/patchwork/profile.html:  list</a> contains {{ user.get_profile.n_todo_patches }}
templates/patchwork/profile.html:  patch{{ user.get_profile.n_todo_patches|pluralize:"es" }}.</p>
templates/patchwork/project.html:    {{ maintainer.get_profile.name }}

Also, removing AUTH_PROFILE_MODULE should be the goal for your patch.
Maybe the test failures are linked to those remaining get_profile()
calls?

Now the question is when to drop support for django 1.5 to support 1.7.
Is there a way to support both? The former is clearly a decision for the
maintainer :p

-- 
Damien


More information about the Patchwork mailing list