<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -6,6 +6,8 @@ from django.contrib.comments.views.comments import post_comment
 from django.conf import settings
 from django.shortcuts import render_to_response
 from recaptcha.client import captcha
+from tagging.utils import get_tag
+from tagging.models import Tag, TaggedItem
 
 
 def feed_redirect(request):
@@ -36,14 +38,7 @@ archive_month = privileged_post_queryset(date_based.archive_month)
 archive_year = privileged_post_queryset(date_based.archive_year)
 # archive_index = privileged_post_queryset(date_based.archive_index)
 
-def archive_index(request):
-    context = {'is_admin': False}
-    posts = Post.objects.active()
-    if request.user.is_authenticated():
-        context.update({'is_admin': True})
-        posts = Post.objects.all()
-    posts = posts.order_by('-pub_date')[:settings.POST_RECENT_COUNT]
-    links = Link.objects.filter(date_removed__isnull=True).order_by('-pub_date')[:settings.DELICIOUS_RECENT_COUNT]
+def _merge_posts_links(posts, links):
     items = []
     for post in posts:
         items.append((post.pub_date, post))
@@ -51,6 +46,17 @@ def archive_index(request):
         items.append((link.pub_date, link))
     items.sort()
     items.reverse()
+    return items
+
+def archive_index(request, tag=None):
+    context = {'is_admin': False}
+    posts = Post.objects.active()
+    if request.user.is_authenticated():
+        context.update({'is_admin': True})
+        posts = Post.objects.all()
+    posts = posts.order_by('-pub_date')[:settings.POST_RECENT_COUNT]
+    links = Link.objects.filter(date_removed__isnull=True).order_by('-pub_date')[:settings.DELICIOUS_RECENT_COUNT]
+    items = _merge_posts_links(posts, links)
     context.update({'post_list': items, 'request': request, 'MEDIA_URL': settings.MEDIA_URL})
     return render_to_response('blog/post_archive.html', context)
 
@@ -86,3 +92,15 @@ def post_comment_wrapper(request, next=None):
         return post_comment(request, next)
     return HttpResponseRedirect(request.GET.get('p', '/'))
 
+def tag_list(request, tag):
+    context = {}
+    tag_instance = get_tag(tag)
+    if tag_instance is None:
+        raise Http404('No Tag found matching &quot;%s&quot;.' % tag)
+    posts = TaggedItem.objects.get_by_model(Post, tag_instance)
+    links = TaggedItem.objects.get_by_model(Link, tag_instance)
+    context['tag'] = tag_instance
+    items = _merge_posts_links(posts, links)
+    context.update({'post_list': items, 'request': request, 'MEDIA_URL': settings.MEDIA_URL})
+    return render_to_response('blog/post_archive.html', context)
+</diff>
      <filename>shiftingbits/blog/views.py</filename>
    </modified>
    <modified>
      <diff>@@ -7,12 +7,12 @@
 &lt;div class=&quot;span-21 posts last archive&quot;&gt;
 	{% for pub_date, post in post_list %}
 		&lt;div class=&quot;post{% if not post.active %} inactive{% endif %}&quot;&gt;
-			{% ifchanged %}&lt;div class=&quot;month&quot;&gt;{{ pub_date|date:&quot;F&quot; }}&lt;/div&gt;{% endifchanged %}
+			{% ifchanged %}&lt;div class=&quot;month&quot;&gt;{{ pub_date|date:&quot;F Y&quot; }}&lt;/div&gt;{% endifchanged %}
 			
 			&lt;div class=&quot;row {{ post.icon_css_class }}&quot;&gt;
 				&lt;div class=&quot;tags&quot;&gt;
 				{% tags_for_object post as tag_list %}
-				{% for tag in tag_list %}{{ tag.name }} {% endfor %}
+				{% for tag in tag_list %}&lt;a href=&quot;/tags/{{ tag.name }}/&quot;&gt;{{ tag.name }}&lt;/a&gt; {% endfor %}
 				&lt;/div&gt;
 				&lt;span class=&quot;post-dateline&quot;&gt;{{ pub_date|date:&quot;d&quot; }}&lt;/span&gt;
 				&lt;h2 class=&quot;h2&quot; title=&quot;{{ post.title }}&quot;&gt;&lt;a href=&quot;{{ post.get_absolute_url }}&quot;&gt;{{ post.title|truncatewords:10 }}&lt;/a&gt;&lt;/h2&gt;</diff>
      <filename>shiftingbits/templates/blog/post_archive.html</filename>
    </modified>
    <modified>
      <diff>@@ -4,7 +4,7 @@ from django.contrib import admin
 from django.views.generic.simple import direct_to_template
 
 from shiftingbits.blog.models import Post
-from shiftingbits.blog.views import object_detail, archive_index, archive_month, archive_day, archive_year, object_detail_redirect, archive_day_redirect, archive_month_redirect
+from shiftingbits.blog.views import object_detail, tag_list, archive_index, archive_month, archive_day, archive_year, object_detail_redirect, archive_day_redirect, archive_month_redirect
 from shiftingbits.blog.feeds import LatestPostFeed, LatestPostsByTagFeed
  
 
@@ -29,7 +29,7 @@ urlpatterns = patterns(&quot;&quot;,
     url(r&quot;^feeds/(?P&lt;url&gt;.*)/$&quot;, &quot;django.contrib.syndication.views.feed&quot;, {&quot;feed_dict&quot;: feeds}, name=&quot;blog_feeds&quot;),
     
     ### Tags
-    url(r&quot;tags/(?P&lt;tag&gt;[^/]+)/$&quot;, &quot;tagging.views.tagged_object_list&quot;, { &quot;queryset_or_model&quot;: Post, &quot;template_object_name&quot;:&quot;post&quot;, &quot;template_name&quot;: &quot;blog/post_archive.html&quot;, &quot;related_tags&quot;: True}, name=&quot;blog_tag_detail&quot;),
+    url(r&quot;tags/(?P&lt;tag&gt;[^/]+)/$&quot;, tag_list, name=&quot;blog_tag_detail&quot;),
     
     ### Handle the way the old links were via redirect
     url(r&quot;^(?P&lt;year&gt;\d{4})/(?P&lt;month&gt;[0-9]*)/(?P&lt;day&gt;\w{1,2})/(?P&lt;slug&gt;[-\w]+)/$&quot;, object_detail_redirect),</diff>
      <filename>shiftingbits/urls.py</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>fb326857be113a4fba3b68339c0e1209f54b27e7</id>
    </parent>
  </parents>
  <author>
    <name>Patrick Altman</name>
    <email>patrick@studionow.com</email>
  </author>
  <url>http://github.com/paltman/shiftingbits/commit/57f966a5c42511fa4aa1b3c39db2529c807b8252</url>
  <id>57f966a5c42511fa4aa1b3c39db2529c807b8252</id>
  <committed-date>2009-11-01T09:16:18-08:00</committed-date>
  <authored-date>2009-11-01T09:16:18-08:00</authored-date>
  <message>added back support for tagging</message>
  <tree>312ee64b67c4e69250948ef811ee38c30cd9b98c</tree>
  <committer>
    <name>Patrick Altman</name>
    <email>patrick@studionow.com</email>
  </committer>
</commit>
