Permalink
Browse files

Fixed #32, also gives each of the date based list views its own template

git-svn-id: file:///Users/brian/Backups/S3/backups/Wednesday/brian/svn/djog/trunk@80 95ab7de8-677b-4562-a266-b8acc9dd993c
  • Loading branch information...
1 parent e313def commit 83e7a701d8eba01ac2470195b2e66d2058960714 @alex alex committed Dec 14, 2007
View
@@ -36,7 +36,7 @@ def archive_year(self, request, **kwargs):
defaults = dict(
queryset = self.get_blog().entry_set.filter(entry_type=Entry.TYPE_POST),
date_field = 'pub_date',
- template_name = 'djog/entry_date.html',
+ template_name = 'djog/archive_year.html',
)
defaults.update(kwargs)
return archive_year(request, **defaults)
@@ -45,7 +45,7 @@ def archive_month(self, request, **kwargs):
defaults = dict(
queryset = self.get_blog().entry_set.filter(entry_type=Entry.TYPE_POST),
date_field = 'pub_date',
- template_name = 'djog/entry_date.html',
+ template_name = 'djog/archive_month.html',
)
defaults.update(kwargs)
return archive_month(request, **defaults)
@@ -54,7 +54,7 @@ def archive_day(self, request, **kwargs):
defaults = dict(
queryset = self.get_blog().entry_set.filter(entry_type=Entry.TYPE_POST),
date_field = 'pub_date',
- template_name = 'djog/entry_date.html',
+ template_name = 'djog/archive_day.html',
)
defaults.update(kwargs)
return archive_day(request, **defaults)
@@ -2,7 +2,7 @@
{% load djog_utils %}
-{% block title %}Entries for {% if year %}{{ year }}{% endif %}{% if month %}{{ month|date:"F, Y" }}{% endif %}{% if day %}{{ day|date:"F j, Y" }}{% endif %}{% endblock %}
+{% block title %}Entries for {{ day|date:"F j, Y" }}{% endblock %}
{% block head_extra %}<link href="{% url djog_feed "latest" %}" title="{{ blog.title }} - Latest Entries" type="application/rss+xml" rel="alternate"/>{% endblock %}
{% block rss %}<a href="{% url djog_feed "latest" %}">RSS</a>{% endblock %}
@@ -0,0 +1,14 @@
+{% extends "base.html" %}
+
+{% load djog_utils %}
+
+{% block title %}Entries for {{ month|date:"F, Y" }}{% endblock %}
+{% block head_extra %}<link href="{% url djog_feed "latest" %}" title="{{ blog.title }} - Latest Entries" type="application/rss+xml" rel="alternate"/>{% endblock %}
+{% block rss %}<a href="{% url djog_feed "latest" %}">RSS</a>{% endblock %}
+
+
+{% block content %}
+{% for entry in object_list %}
+{% show_entry entry %}
+{% endfor %}
+{% endblock %}
@@ -0,0 +1,25 @@
+{% extends "base.html" %}
+
+{% load djog_utils %}
+
+{% block title %}Entries for {{ year }}{% endblock %}
+{% block head_extra %}<link href="{% url djog_feed "latest" %}" title="{{ blog.title }} - Latest Entries" type="application/rss+xml" rel="alternate"/>{% endblock %}
+{% block rss %}<a href="{% url djog_feed "latest" %}">RSS</a>{% endblock %}
+
+
+{% block content %}
+<div class="post">
+ <div class="post_title post_title_alt">
+ <h2>{{ year }} Archive</h2>
+ </div>
+ <div class="clear"></div>
+ <div class="entry">
+ <ul>
+ {% for month in date_list %}
+ <p>
+ <a href="{% url djog_archive_month month|date:"Y",month|date:"b" %}">{{ month|date:"F" }}</a>
+ </p>
+ </div>
+</div>
+{% endfor %}
+{% endblock %}

0 comments on commit 83e7a70

Please sign in to comment.