def review_list(request):
    list_object = PostReview.published.all()
    paginator = Paginator(list_object, 1)
    page = request.GET.get('page')
    try:
        reviews = paginator.page(page)
    except PageNotAnInteger:
        reviews = paginator.page(1)
    except EmptyPage:
        reviews = paginator.page(paginator.num_pages)
    return render(request, 'reviews/review/list.html', {'page': page, 'reviews': reviews})
def review_list(request):
    list_object = PostReview.published.all()
    paginator = Paginator(list_object, 1)
    page = request.GET.get('page')
    try:
        reviews = paginator.page(page)
    except PageNotAnInteger:
        reviews = paginator.page(1)
    except EmptyPage:
        reviews = paginator.page(paginator.num_pages)
    return render(request, 'reviews/review/list.html', {'page': page, 'reviews': reviews})