diff options
author | Stephen Finucane <stephen.finucane@intel.com> | 2015-12-08 15:09:00 +0000 |
---|---|---|
committer | Stephen Finucane <stephen.finucane@intel.com> | 2016-01-19 21:55:26 +0000 |
commit | 97b7b45a94ba7420f105938179b2a8a114bee040 (patch) | |
tree | 62ca29e3b464696136c08162f3436881b94b42d0 /templates/base.html | |
parent | 68686d1774ea74e71f16ae098d28a321a2f930a3 (diff) | |
download | patchwork-97b7b45a94ba7420f105938179b2a8a114bee040.tar patchwork-97b7b45a94ba7420f105938179b2a8a114bee040.tar.gz |
Use URL names in place of Python paths
Reversing by Python paths has been deprecated in Django 1.8, causes
warnings in Django 1.9 and will be removed in Django 2.0. Resolve the
warnings and prevent issues in the future by referring to URLs by name,
rather than by Python path.
https://docs.djangoproject.com/en/1.9/releases/1.8/#passing-a-dotted-path-to-reverse-and-url
Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
Diffstat (limited to 'templates/base.html')
-rw-r--r-- | templates/base.html | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/templates/base.html b/templates/base.html index b6f7056..dec904b 100644 --- a/templates/base.html +++ b/templates/base.html @@ -34,21 +34,21 @@ <span class="icon-bar"></span> </button> <span class="navbar-brand"><a - href="{% url 'patchwork.views.project.list' %}">Patchwork</a> + href="{% url 'project-list' %}">Patchwork</a> {% block heading %}{% endblock %}</span> </div> <div class="collapse navbar-collapse" id="navbar-collapse"> <ul class="nav navbar-nav navbar-right"> {% if project %} - <li><a href="{% url 'patchwork.views.project.project' project_id=project.linkname %}" + <li><a href="{% url 'project-detail' project_id=project.linkname %}" >Project Info</a></li> <li><p class="navbar-text">|</p></li> {% endif %} {% if user.is_authenticated %} - <li><a href="{% url 'patchwork.views.user.todo_lists' %}">Todo + <li><a href="{% url 'user-todos' %}">Todo <span class="badge">{{ user.profile.n_todo_patches }}</span></a> </li> - <li><a href="{% url 'patchwork.views.bundle.bundles' %}">Bundles</a></li> + <li><a href="{% url 'bundle-list' %}">Bundles</a></li> {% if user.is_staff %} <li><a href="{% url 'admin:index' %}">Admin</a></li> {% endif %} @@ -57,14 +57,14 @@ ><strong>{{ user.username }}</strong> <span class="caret" /></a> <ul class="dropdown-menu" role="menu"> - <li><a href="{% url 'patchwork.views.user.profile' %}">View profile</a></li> + <li><a href="{% url 'user-profile' %}">View profile</a></li> <li><a href="{% url 'auth_logout' %}">Logout</a></li> </ul> </li> {% else %} <li><a href="{% url 'auth_login' %}">Login</a></li> - <li><a href="{% url 'patchwork.views.user.register' %}">Register</a></li> - <li><a href="{% url 'patchwork.views.mail.settings' %}">Mail settings</a></li> + <li><a href="{% url 'user-register' %}">Register</a></li> + <li><a href="{% url 'mail-settings' %}">Mail settings</a></li> {% endif %} </div> </div> @@ -72,10 +72,10 @@ {% if project %} <div id="breadcrumb"> <div id="breadcrumb-left"> - <a href="{% url 'patchwork.views.project.list' %}">All projects</a> + <a href="{% url 'project-list' %}">All projects</a> → {% block breadcrumb %} - <a href="{% url 'patchwork.views.patch.list' project_id=project.linkname %}" + <a href="{% url 'patch-list' project_id=project.linkname %}" >{{ project.linkname }} patches</a> {% endblock %} </div> @@ -96,7 +96,7 @@ <div id="footer"> <a href="http://jk.ozlabs.org/projects/patchwork/">patchwork</a> patch tracking system | <a - href="{% url 'patchwork.views.help.help' path="about/" %}">about patchwork</a> + href="{% url 'help' path="about/" %}">about patchwork</a> </div> </body> </html> |