Changeset - 8115cb27e2a2
[Not reviewed]
0 1 0
Brett Smith (brett) - 5 years ago 2017-02-03 15:31:51
brett@sfconservancy.org
blog: Fix variable name typo in views code.
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
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"
0 comments (0 inline, 0 general)