File diff 0ef963a5bd8f → 8115cb27e2a2
www/conservancy/apps/blog/views.py
Show inline comments
...
 
@@ -61,25 +61,25 @@ def custom_index(request, queryset, *args, **kwargs):
 
    paginate_by = kwargs.get('paginate_by', 6)  # Show 6 news items per page, by default
 
    paginator = Paginator(queryset, paginate_by)
 

	
 
    page = request.GET.get('page')
 

	
 
    try:
 
        blog_entries = paginator.page(page)
 
    except PageNotAnInteger:
 
        # If page is not an integer, deliver first page.
 
        blog_entries = paginator.page(1)
 
    except EmptyPage:
 
        # If page is out of range (e.g. 9999), deliver last page of results.
 
        blog_entires = paginator.page(paginator.num_pages)
 
        blog_entries = paginator.page(paginator.num_pages)
 

	
 
    extra_context['blog_entries'] = blog_entries
 

	
 
    return render_to_response('blog/entry_list.html', extra_context, context_instance=RequestContext(request))
 

	
 
def techblog_redirect(request):
 
    """Redirect from the old 'techblog' to the new blog
 
    """
 

	
 
    path = request.path[len('/technology'):]
 
    if path == '/blog/':
 
        path += "?author=bkuhn"