def page_history(request, slug, **kwargs):
    try:
        page = Page.objects.filter(slug=slug).get()
    except __HOLE__:
        raise Http404, "No page found matching the query"

    if not page.has_read_permission(request.user):
        if request.user.is_anonymous():
            return HttpResponseRedirect('%s?%s=%s' % (settings.LOGIN_URL, REDIRECT_FIELD_NAME, urlquote(request.get_full_path())))
        else:
            return render_to_response('wiki/permission_denied.html', context_instance=RequestContext(request))

    kwargs['queryset'] = Revision.objects.filter(page=page)
    kwargs['extra_context'] = {'page': page}
    kwargs['template_name'] = 'wiki/page_history.html'
    kwargs['template_object_name'] = 'revision'
    kwargs['paginate_by'] = settings.WIKI_HISTORY_PAGINATE_BY
    
    return object_list(request, **kwargs)
dataset/ETHPy150Open kylef-archive/lithium/lithium/wiki/views.py/page_history