Chris Franklin avatar Chris Franklin committed 27051d0 Draft

Updates url template tag to new 1.5 format with fallback to future.

Comments (0)

Files changed (4)

gnotty/templates/gnotty/base.html

+{% load url from future %}
 {% load gnotty_tags %}<!doctype html>
 <html lang="en">
 
 <div class="navbar navbar-fixed-top">
 <div class="navbar-inner">
 <div class="container">
-    <a class="brand" href="{% url gnotty_chat %}">{{ IRC_CHANNEL }}</a>
+    <a class="brand" href="{% url 'gnotty_chat' %}">{{ IRC_CHANNEL }}</a>
     {% gnotty_nav %}
     <form id="joins-leaves" class="pull-right nav-collapse" action="#joins-leaves">
         <input type="checkbox" id="show-joins-leaves">
 </div>
 
 <footer>
-<form class="container form-inline chat" action="{% url gnotty_chat %}">
+<form class="container form-inline chat" action="{% url 'gnotty_chat' %}">
 <div class="row">
 <div class="span9 control-group">
 <div class="controls">

gnotty/templates/gnotty/calendar.html

 {% extends "gnotty/base.html" %}
 
+{% load url from future %}
+
+
 {% block content %}
 {% for month in months %}
 
 
 <div class="span4">
 <table class="table table-striped calendar">
-    <tr><th colspan="7"><h2><a href="{% url gnotty_month month.month.year month.month.month %}">{{ month.month|date:"N Y" }}</a></h2></th></tr>
+    <tr><th colspan="7"><h2><a href="{% url 'gnotty_month' month.month.year month.month.month %}">{{ month.month|date:"N Y" }}</a></h2></th></tr>
     {% for week in month.weeks %}
     <tr>
     {% for day in week %}
     <td{% if not day.in_month %} class="not-in-month"{% endif %}>
         {% if day.has_messages %}
-        <a href="{% url gnotty_day day.date.year day.date.month day.date.day %}">{{ day.date.day }}</a>
+        <a href="{% url 'gnotty_day' day.date.year day.date.month day.date.day %}">{{ day.date.day }}</a>
         {% else %}
         {{ day.date.day }}
         {% endif %}

gnotty/templates/gnotty/includes/nav.html

+{% load url from future %}
 
 <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
     <span class="icon-bar"></span>
 
 <div class="nav-collapse">
 
-    <form action="{% url gnotty_search %}" class="navbar-search pull-right">
+    <form action="{% url 'gnotty_search' %}" class="navbar-search pull-right">
         <input required placeholder="Search" type="text" name="q" value="{{ request.GET.q }}">
         {% if request.user.is_authenticated %}
         <a class="btn btn-small logout" href="{{ LOGOUT_URL }}">Logout</a>
             <a href="#" data-toggle="dropdown">Archives<span class="caret"></span></a>
             <ul class="dropdown-menu">
                 {% for year in years %}
-                <li><a href="{% url gnotty_year year %}">{{ year }}</a></li>
+                <li><a href="{% url 'gnotty_year' year %}">{{ year }}</a></li>
                 {% endfor %}
             </ul>
         </li>

gnotty/templates/gnotty/messages.html

 {% extends "gnotty/base.html" %}
 
+{% load url from future %}
+
+
 {% block extrahead %}
 {{ block.super }}
 {% if request.GET.id %}
             {% if prev_url %}<li><a href="{{ prev_url }}" class="previous">&larr; Previous day</a></li>{% endif %}
             {% if next_url %}<li><a href="{{ next_url }}" class="next">Next day &rarr;</a></li>{% endif %}
         </ul>
-        <h2><a href="{% url gnotty_day day.year day.month day.day %}">{{ day }}</a></h2>
+        <h2><a href="{% url 'gnotty_day' day.year day.month day.day %}">{{ day }}</a></h2>
     </th>
 </tr>
 {% endifchanged %}
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.