Commits

Ales Zabala Alava  committed 3b8c04d

compatibility with django 1.5, use new url templatetag format

  • Participants
  • Parent commits f1dedb2

Comments (1)

Files changed (5)

File articles/templates/articles/_articles.html

 {% load i18n %}
+{% load url from future %}
 {% if forloop.first %}<ol class="article-list">{% endif %}
     <li>
         <h3><a href="{{ article.get_absolute_url }}" title="{% trans 'Read this article' %}">{{ article.title }}</a></h3>
         <div class="quiet">
             {% trans 'Posted on' %} {{ article.publish_date|date:"F jS, Y" }}
-            {% trans 'by' %} <a href="{% url articles_by_author article.author.username %}" title="{% trans 'View articles posted by' %} {{ article.author.get_name }}">{{ article.author.get_name }}</a>
+            {% trans 'by' %} <a href="{% url "articles_by_author" article.author.username %}" title="{% trans 'View articles posted by' %} {{ article.author.get_name }}">{{ article.author.get_name }}</a>
         </div>
     </li>
-{% if forloop.last %}</ol>{% endif %}
+{% if forloop.last %}</ol>{% endif %}

File articles/templates/articles/_meta.html

 {% load i18n humanize %}
+{% load url from future %}
 
 <div id="article-meta">
   <h4>Meta</h4>
 
   <p><strong>{% trans 'Published' %}</strong>: {{ article.publish_date|naturalday }}</p>
 
-  <p><strong>{% trans 'Author' %}</strong>: <a href="{% url articles_by_author article.author.username %}" title="{% trans 'Read other articles by this author' %}">{{ article.author.get_name }}</a></p>
+  <p><strong>{% trans 'Author' %}</strong>: <a href="{% url "articles_by_author" article.author.username %}" title="{% trans 'Read other articles by this author' %}">{{ article.author.get_name }}</a></p>
 
   <p><strong>{% trans 'Comments' %}</strong>: <a href="#disqus_thread">&nbsp;</a></p>
 

File articles/templates/articles/article_detail.html

 {% extends 'articles/base.html' %}
 {% load i18n %}
+{% load url from future %}
 
 {% block title %}{% trans article.title %}{% endblock %}
 {% block meta-keywords %}{{ article.keywords|escape }}{% endblock %}
 {% block extra-head %}
 {{ block.super }}
 {% for tag in article.tags.all %}
-<link rel="alternate" type="application/rss+xml" title="Blog Articles Tagged '{{ tag.name }}' RSS Feed" href="{% url articles_rss_feed_tag tag.rss_name %}" />
-<link rel="alternate" type="application/atom+xml" title="Blog Articles Tagged '{{ tag.name }}' Atom Feed" href="{% url articles_atom_feed_tag tag.rss_name %}" />{% endfor %}
+<link rel="alternate" type="application/rss+xml" title="Blog Articles Tagged '{{ tag.name }}' RSS Feed" href="{% url "articles_rss_feed_tag" tag.rss_name %}" />
+<link rel="alternate" type="application/atom+xml" title="Blog Articles Tagged '{{ tag.name }}' Atom Feed" href="{% url "articles_atom_feed_tag" tag.rss_name %}" />{% endfor %}
 {% endblock %}
 
 {% block content %}

File articles/templates/articles/base.html

 {% extends 'base.html' %}
 {% load article_tags i18n %}
+{% load url from future %}
 
 {% block extra-head %}
 {{ block.super }}
-<link rel="alternate" type="application/rss+xml" title="Latest Blog Articles RSS Feed" href="{% url articles_rss_feed_latest %}" />
-<link rel="alternate" type="application/atom+xml" title="Latest Blog Articles Atom Feed" href="{% url articles_atom_feed_latest %}" />
+<link rel="alternate" type="application/rss+xml" title="Latest Blog Articles RSS Feed" href="{% url "articles_rss_feed_latest" %}" />
+<link rel="alternate" type="application/atom+xml" title="Latest Blog Articles Atom Feed" href="{% url "articles_atom_feed_latest" %}" />
 {% endblock %}
 
 {% block content %}
             <strong>{{ year.0 }}</strong>
             <ul class="months">
             {% for month in year.1 %}
-                <li><a href="{% url articles_in_month month.year,month.month %}" title="{% trans 'View articles posted in this month' %}">{{ month|date:"N" }}</a></li>
+                <li><a href="{% url "articles_in_month" month.year,month.month %}" title="{% trans 'View articles posted in this month' %}">{{ month|date:"N" }}</a></li>
             {% endfor %}
             </ul>
             <div class="clear">&nbsp;</div>

File articles/templates/articles/display_tag.html

 {% extends 'articles/base.html' %}
 {% load i18n %}
+{% load url from future %}
 
 {% block title %}{% trans 'Articles Tagged' %}: {{ tag.name }}{% endblock %}
 {% block extra-head %}
 {{ block.super }}
-<link rel="alternate" type="application/rss+xml" title="Blog Articles Tagged '{{ tag.name }}' RSS Feed" href="{% url articles_rss_feed_tag tag.rss_name %}" />
-<link rel="alternate" type="application/atom+xml" title="Blog Articles Tagged '{{ tag.name }}' Atom Feed" href="{% url articles_atom_feed_tag tag.rss_name %}" />
+<link rel="alternate" type="application/rss+xml" title="Blog Articles Tagged '{{ tag.name }}' RSS Feed" href="{% url "articles_rss_feed_tag" tag.rss_name %}" />
+<link rel="alternate" type="application/atom+xml" title="Blog Articles Tagged '{{ tag.name }}' Atom Feed" href="{% url "articles_atom_feed_tag" tag.rss_name %}" />
 {% endblock %}
 
 {% block articles-content %}