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 /templates | |
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 'templates')
-rw-r--r-- | templates/base.html | 2 | ||||
-rw-r--r-- | templates/patchwork/patch.html | 2 | ||||
-rw-r--r-- | templates/patchwork/profile.html | 14 | ||||
-rw-r--r-- | templates/patchwork/project.html | 2 |
4 files changed, 10 insertions, 10 deletions
diff --git a/templates/base.html b/templates/base.html index 56091b4..f04d6e1 100644 --- a/templates/base.html +++ b/templates/base.html @@ -22,7 +22,7 @@ ><strong>{{ user.username }}</strong></a> <br/> <a href="{% url 'patchwork.views.user.todo_lists' %}">todo - ({{ user.get_profile.n_todo_patches }})</a> :: + ({{ user.profile.n_todo_patches }})</a> :: <a href="{% url 'patchwork.views.bundle.bundles' %}">bundles</a> <br/> <a href="{% url 'patchwork.views.user.profile' %}">profile</a> :: diff --git a/templates/patchwork/patch.html b/templates/patchwork/patch.html index be831e9..f18ee3b 100644 --- a/templates/patchwork/patch.html +++ b/templates/patchwork/patch.html @@ -68,7 +68,7 @@ function toggle_headers(link_id, headers_id) {% if patch.delegate %} <tr> <th>Delegated to:</th> - <td>{{ patch.delegate.get_profile.name }}</td> + <td>{{ patch.delegate.profile.name }}</td> </tr> {% endif %} <tr> diff --git a/templates/patchwork/profile.html b/templates/patchwork/profile.html index 624efe2..116d6d6 100644 --- a/templates/patchwork/profile.html +++ b/templates/patchwork/profile.html @@ -7,16 +7,16 @@ {% block body %} <p> -{% if user.get_profile.maintainer_projects.count %} +{% if user.profile.maintainer_projects.count %} Maintainer of -{% for project in user.get_profile.maintainer_projects.all %} +{% for project in user.profile.maintainer_projects.all %} <a href="{% url 'patchwork.views.patch.list' project_id=project.linkname %}" >{{ project.linkname }}</a>{% if not forloop.last %},{% endif %}{% endfor %}. {% endif %} -{% if user.get_profile.contributor_projects.count %} +{% if user.profile.contributor_projects.count %} Contributor to -{% for project in user.get_profile.contributor_projects.all %} +{% for project in user.profile.contributor_projects.all %} <a href="{% url 'patchwork.views.patch.list' project_id=project.linkname %}" >{{ project.linkname }}</a>{% if not forloop.last %},{% endif %}{% endfor %}. {% endif %} @@ -25,10 +25,10 @@ Contributor to <div class="leftcol"> <div class="box"> <h2>Todo</h2> -{% if user.get_profile.n_todo_patches %} +{% if user.profile.n_todo_patches %} <p>Your <a href="{% url 'patchwork.views.user.todo_lists' %}">todo - list</a> contains {{ user.get_profile.n_todo_patches }} - patch{{ user.get_profile.n_todo_patches|pluralize:"es" }}.</p> + list</a> contains {{ user.profile.n_todo_patches }} + patch{{ user.profile.n_todo_patches|pluralize:"es" }}.</p> {% else %} <p>Your todo list contains patches that have been delegated to you. You have no items in your todo list at present.</p> diff --git a/templates/patchwork/project.html b/templates/patchwork/project.html index 73e85df..be8cadc 100644 --- a/templates/patchwork/project.html +++ b/templates/patchwork/project.html @@ -18,7 +18,7 @@ <th>Maintainer{{maintainers|length|pluralize}}</th> <td> {% for maintainer in maintainers %} - {{ maintainer.get_profile.name }} + {{ maintainer.profile.name }} <<a href="mailto:{{maintainer.email}}">{{maintainer.email}}</a>> <br /> {% endfor %} |