diff options
author | Dan McGee <dpmcgee@gmail.com> | 2011-03-24 21:04:48 -0500 |
---|---|---|
committer | Dan McGee <dpmcgee@gmail.com> | 2011-03-24 21:04:48 -0500 |
commit | 149880188e3a8f9a93744d3f8e0042b9da2a7ce6 (patch) | |
tree | 697f4b0b0b970f6c30a5bef08e319e38663cd6e8 | |
parent | 4325cc5a9a363c69ef6d74ba7a9742fcc3b3eb4b (diff) | |
download | website-149880188e3a8f9a93744d3f8e0042b9da2a7ce6.tar.gz website-149880188e3a8f9a93744d3f8e0042b9da2a7ce6.zip |
1.3 updates: load url from future tag
Signed-off-by: Dan McGee <dpmcgee@gmail.com>
-rw-r--r-- | templates/base.html | 11 | ||||
-rw-r--r-- | templates/blog/archive_index.html | 5 | ||||
-rw-r--r-- | templates/blog/default.html | 10 | ||||
-rw-r--r-- | templates/blog/post_detail.html | 4 | ||||
-rw-r--r-- | templates/blog/post_list.html | 2 | ||||
-rw-r--r-- | templates/blog/postcategory_detail.html | 5 | ||||
-rw-r--r-- | templates/blog/postcategory_list.html | 5 | ||||
-rw-r--r-- | templates/blog/singlepost.html | 7 | ||||
-rw-r--r-- | templates/index.html | 15 |
9 files changed, 41 insertions, 23 deletions
diff --git a/templates/base.html b/templates/base.html index 9da78c6..47d2caf 100644 --- a/templates/base.html +++ b/templates/base.html @@ -8,6 +8,7 @@ <title>{% block title %}toofishes.net{% endblock %}</title> {% block headdata %}{% endblock %} </head> +{% load url from future %} <body> <div id="container"> <div id="header"> @@ -18,12 +19,12 @@ <div id="navbar"> {% block navbar %} <ul class="navigation"> - <li><a href="{% url page-index %}">Home</a></li> - <li><a href="{% url page-about %}">About</a></li> - <li><a href="{% url blog-index %}">Blog</a></li> + <li><a href="{% url 'page-index' %}">Home</a></li> + <li><a href="{% url 'page-about' %}">About</a></li> + <li><a href="{% url 'blog-index' %}">Blog</a></li> <li><a href="http://code.toofishes.net/cgit/">Code</a></li> - {% if user.is_authenticated %}<li><a href="{% url admin:index %}">Admin</a></li> - <li><a href="{% url admin:logout %}">Logout</a></li>{% endif %} + {% if user.is_authenticated %}<li><a href="{% url 'admin:index' %}">Admin</a></li> + <li><a href="{% url 'admin:logout' %}">Logout</a></li>{% endif %} </ul> {% endblock %} </div> diff --git a/templates/blog/archive_index.html b/templates/blog/archive_index.html index 9b4027c..e5145cf 100644 --- a/templates/blog/archive_index.html +++ b/templates/blog/archive_index.html @@ -1,4 +1,7 @@ {% extends "blog/base.html" %} + +{% load url from future %} + {% block subtitle %}Blog Archive{% endblock %} {% block content %} @@ -8,6 +11,6 @@ <h3>{{ year.grouper }}</h3> <ul> {% for post in year.list %} - <li><a href="{% url blog-single-post slug=post.slug %}">{{ post.title }}</a> - {{ post.pub_date|date }}</li>{% endfor %} + <li><a href="{% url 'blog-single-post' slug=post.slug %}">{{ post.title }}</a> - {{ post.pub_date|date }}</li>{% endfor %} </ul>{% endfor %} {% endblock %} diff --git a/templates/blog/default.html b/templates/blog/default.html index 591865c..16e662d 100644 --- a/templates/blog/default.html +++ b/templates/blog/default.html @@ -1,8 +1,10 @@ {% extends "blog/base.html" %} +{% load url from future %} + {% block blogheaddata %} -<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="{% url rss-blog %}" /> -<link rel="alternate" type="application/atom+xml" title="Atom" href="{% url atom-blog %}" /> +<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="{% url 'rss-blog' %}" /> +<link rel="alternate" type="application/atom+xml" title="Atom" href="{% url 'atom-blog' %}" /> {% endblock %} {% block content %} @@ -11,7 +13,7 @@ {% endfor %} <div class="moreinfo"> <p>Want to see more posts? Take a look at the - <a href="{% url blog-archive %}">archives</a> - or take a look at the <a href="{% url blog-tags %}">tag list</a>.</p> + <a href="{% url 'blog-archive' %}">archives</a> + or take a look at the <a href="{% url 'blog-tags' %}">tag list</a>.</p> </div> {% endblock %} diff --git a/templates/blog/post_detail.html b/templates/blog/post_detail.html index 88b75a2..b531875 100644 --- a/templates/blog/post_detail.html +++ b/templates/blog/post_detail.html @@ -1,5 +1,7 @@ {% extends "blog/base.html" %} +{% load url from future %} + {% block subtitle %}{{ object.title }}{% endblock %} {% block content %} @@ -11,7 +13,7 @@ </div> <div class="postinfo"> <div class="categories">{% for category in object.categories.all %} - <span><a href="{% url blog-single-tag category=category %}">{{ category }}</a></span>{% endfor %} + <span><a href="{% url 'blog-single-tag' category=category %}">{{ category }}</a></span>{% endfor %} </div> </div> {% if object.similar_posts %} diff --git a/templates/blog/post_list.html b/templates/blog/post_list.html index d370494..d48839f 100644 --- a/templates/blog/post_list.html +++ b/templates/blog/post_list.html @@ -5,6 +5,6 @@ <h2>All Posts</h2> <ul> {% for post in object_list %} - <li><a href="{% url blog-single-post slug=post.slug %}">{{ post.title }}</a> - {{ post.pub_date|date }}</li>{% endfor %} + <li><a href="{% url 'blog-single-post' slug=post.slug %}">{{ post.title }}</a> - {{ post.pub_date|date }}</li>{% endfor %} </ul> {% endblock %} diff --git a/templates/blog/postcategory_detail.html b/templates/blog/postcategory_detail.html index 918b54b..f117f57 100644 --- a/templates/blog/postcategory_detail.html +++ b/templates/blog/postcategory_detail.html @@ -1,10 +1,13 @@ {% extends "blog/base.html" %} + +{% load url from future %} + {% block subtitle %}Blog Tag ({{ pc.category }}){% endblock %} {% block content %} <h2>Posts tagged <em>{{ pc.category }}</em></h2> <ul> {% for post in posts %} - <li><a href="{% url blog-single-post slug=post.slug %}">{{ post.title }}</a> - {{ post.pub_date|date }}</li>{% endfor %} + <li><a href="{% url 'blog-single-post' slug=post.slug %}">{{ post.title }}</a> - {{ post.pub_date|date }}</li>{% endfor %} </ul> {% endblock %} diff --git a/templates/blog/postcategory_list.html b/templates/blog/postcategory_list.html index 85f0d1c..4947a35 100644 --- a/templates/blog/postcategory_list.html +++ b/templates/blog/postcategory_list.html @@ -1,11 +1,14 @@ {% extends "blog/base.html" %} + +{% load url from future %} + {% block subtitle %}Blog Tags{% endblock %} {% block content %} <h2>All Tags</h2> <ul id="taglist"> {% for pc in object_list %} -<li value="{{pc.post_count}}"><a href="{% url blog-single-tag category=pc.category %}">{{ pc.category }}</a><span class="postcount"> - {{ pc.post_count }} post{{ pc.post_count|pluralize }}<span></li> +<li value="{{pc.post_count}}"><a href="{% url 'blog-single-tag' category=pc.category %}">{{ pc.category }}</a><span class="postcount"> - {{ pc.post_count }} post{{ pc.post_count|pluralize }}<span></li> {% endfor %} </ul> {% endblock %} diff --git a/templates/blog/singlepost.html b/templates/blog/singlepost.html index 8c926da..e36a590 100644 --- a/templates/blog/singlepost.html +++ b/templates/blog/singlepost.html @@ -1,12 +1,13 @@ +{% load url from future %} <div class="postsingle"> - <h2 class="posttitle"><a href="{% url blog-single-post slug=post.slug %}">{{ post.title }}</a></h2> + <h2 class="posttitle"><a href="{% url 'blog-single-post' slug=post.slug %}">{{ post.title }}</a></h2> <h4 class="postpubdate">Posted {{ post.pub_date|date }} at {{ post.pub_date|time }}</h4> <div class="postcontent">{{ post.html|safe }}</div> <div class="postinfo"> <div class="categories">{% for category in post.categories.all %} - <span><a href="{% url blog-single-tag category=category %}">{{ category }}</a></span>{% endfor %} + <span><a href="{% url 'blog-single-tag' category=category %}">{{ category }}</a></span>{% endfor %} </div> {% load comments %}{% get_comment_count for post as comment_count %} - <p class="commentcount"><a href="{% url blog-single-post slug=post.slug %}#comments">{{ comment_count }} comment{{ comment_count|pluralize }}</a></p> + <p class="commentcount"><a href="{% url 'blog-single-post' slug=post.slug %}#comments">{{ comment_count }} comment{{ comment_count|pluralize }}</a></p> </div> </div> diff --git a/templates/index.html b/templates/index.html index e0b2c51..8e1a8bd 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1,8 +1,11 @@ {% extends "base.html" %} + +{% load url from future %} + {% block headdata %} <meta name="verify-v1" content="UDCMxyj13AopMD2Qsfr3So1nzShqDllJ86ySqsFQAGU=" /> -<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="{% url rss-blog %}" /> -<link rel="alternate" type="application/atom+xml" title="Atom" href="{% url atom-blog %}" /> +<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="{% url 'rss-blog' %}" /> +<link rel="alternate" type="application/atom+xml" title="Atom" href="{% url 'atom-blog' %}" /> {% endblock %} {% block title %}toofishes.net - Main Page{% endblock %} @@ -11,7 +14,7 @@ <p>Welcome to my website, which is about 95% composed of my blog with a variety of other pages strewn about.</p> <p>If you want to know more about who I am or what I do, check out the <a - href="{% url page-about %}">About Me</a> page. Hint: I'm an open source and + href="{% url 'page-about' %}">About Me</a> page. Hint: I'm an open source and freelance software developer who updates his <strike>soapbox</strike> blog every once in a while with some helpful tips or hopefully relevant ramblings.</p> @@ -19,16 +22,16 @@ ramblings.</p> <h3>Recent Blog Posts</h3> <ul> {% for post in blogposts %} - <li><a href="{% url blog-single-post slug=post.slug %}">{{ post.title }}</a> - {{ post.pub_date|date }}</li> + <li><a href="{% url 'blog-single-post' slug=post.slug %}">{{ post.title }}</a> - {{ post.pub_date|date }}</li> {% endfor %} </ul> -<p>Not seeing the post you are looking for? Head to the <a href="{% url blog-archive %}">archives</a>.</p> +<p>Not seeing the post you are looking for? Head to the <a href="{% url 'blog-archive' %}">archives</a>.</p> <h3>All Tags</h3> <ul id="taglist"> {% for pc in categories %} -<li value="{{pc.post_count}}"><a href="{% url blog-single-tag category=pc.category %}">{{ pc.category }}</a><span class="postcount"> - {{ pc.post_count }} post{{ pc.post_count|pluralize }}</span></li> +<li value="{{pc.post_count}}"><a href="{% url 'blog-single-tag' category=pc.category %}">{{ pc.category }}</a><span class="postcount"> - {{ pc.post_count }} post{{ pc.post_count|pluralize }}</span></li> {% endfor %} </ul> {% endblock %} |