def user_system_index(request):
    from settings import BUG_URL as BUG_URL
    system_list = models.UnmanagedSystem.objects.select_related('owner', 'server_model', 'operating_system').order_by('owner__name')
    paginator = Paginator(system_list, 25)                                                                        
                    
    if 'page' in request.GET:
        page = request.GET.get('page')
    else:   
        page = 1
        
    try:
        systems = paginator.page(page)
    except PageNotAnInteger:
        # If page is not an integer, deliver first page.
        systems = paginator.page(1)
    except EmptyPage:
        # If page is out of range (e.g. 9999), deliver last page of results.
        systems = paginator.page(paginator.num_pages)

    return render_to_response('user_systems/unmanagedsystem_list.html', {
            'user_system_list': systems,
            'BUG_URL': BUG_URL
            },RequestContext(request) )
dataset/ETHPy150Open mozilla/inventory/user_systems/views.py/user_system_index/original