def manufacturers(request,
                  template_name='lfs/manufacturers/manufacturers.html'):
    """ Display list of all manufacturers
    """
    try:
        start = int((request.POST if request.method == 'POST' else request.GET).get("start", 1))
    except (ValueError, __HOLE__):
        start = 1

    manufacturers = Manufacturer.objects.all()

    # prepare paginator
    paginator = Paginator(manufacturers, 25)

    try:
        current_page = paginator.page(start)
    except (EmptyPage, InvalidPage):
        current_page = paginator.page(paginator.num_pages)

    pagination_data = lfs_pagination(request, current_page, url=reverse('lfs_manufacturers'))

    count = manufacturers.count()

    pagination_data['total_text'] = ungettext('%(count)d manufacturer',
                                              '%(count)d manufacturers',
                                              count) % {'count': count}

    return render(request, template_name, {
        "pagination": pagination_data,
        "manufacturers": current_page.object_list,
        "all_manufacturers": manufacturers  # pass it if someone doesn't want pagination
    })
dataset/ETHPy150Open diefenbach/django-lfs/lfs/manufacturer/views.py/manufacturers