diff options
author | Dan McGee <dpmcgee@gmail.com> | 2012-02-15 13:18:26 -0600 |
---|---|---|
committer | Dan McGee <dpmcgee@gmail.com> | 2012-02-15 13:18:26 -0600 |
commit | 2aafc5c964176798505f638d28233744b2f38ff6 (patch) | |
tree | 03b78fb28b107b942a2f6855a22619898c4c3d63 | |
parent | 53acee705189a383e90cf3ff101f28fbea5a0883 (diff) | |
download | website-2aafc5c964176798505f638d28233744b2f38ff6.tar.gz website-2aafc5c964176798505f638d28233744b2f38ff6.zip |
Show 10 instead of 5 most recent posts
Signed-off-by: Dan McGee <dpmcgee@gmail.com>
-rw-r--r-- | blog/urls.py | 2 | ||||
-rw-r--r-- | general/views.py | 2 | ||||
-rw-r--r-- | templates/index.html | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/blog/urls.py b/blog/urls.py index 1db2363..01cbfdd 100644 --- a/blog/urls.py +++ b/blog/urls.py @@ -6,7 +6,7 @@ date_info_dict = { 'queryset': Post.objects.public(), 'date_field': 'pub_date' } -plain_info_dict = dict(date_info_dict, num_latest=5, +plain_info_dict = dict(date_info_dict, num_latest=10, template_name='blog/default.html') year_info_dict = dict(date_info_dict, make_object_list=True) month_info_dict = dict(date_info_dict, month_format='%m') diff --git a/general/views.py b/general/views.py index 7ffad51..7a2a12c 100644 --- a/general/views.py +++ b/general/views.py @@ -5,7 +5,7 @@ from django.template import RequestContext def index(request): from blog.models import Post, PostCategory frontcontent = { - 'blogposts': Post.objects.public()[:5], + 'blogposts': Post.objects.public()[:10], 'categories': PostCategory.objects.filter(post__public=True). annotate(post_count=Count('post')).filter(post_count__gt=0) } diff --git a/templates/index.html b/templates/index.html index 8e1a8bd..793f372 100644 --- a/templates/index.html +++ b/templates/index.html @@ -19,7 +19,7 @@ freelance software developer who updates his <strike>soapbox</strike> blog every once in a while with some helpful tips or hopefully relevant ramblings.</p> -<h3>Recent Blog Posts</h3> +<h3>Last {{ blogposts|length }} 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> |