Exemplo n.º 1
0
def book(request):
    pager_obj = Pagination(request.GET.get('page', 1), len(Book_list),
                           request.path_info, request.GET)
    book_list = Book_list[pager_obj.start:pager_obj.end]
    html = pager_obj.page_html()

    from django.http import QueryDict  # request.GET
    # params = QueryDict(mutable=True)

    # request.GET是一个QueryDict类型,
    # 默认不可修改,request.GET._mutable = True
    # request.GET.urlencode() 用于讲k,v构造成URL格式字符串
    # request.GET['page'] = 666

    # _list_filter=page%3D5%26id__gt%3D4
    params = QueryDict(mutable=True)
    params['_list_filter'] = request.GET.urlencode()
    list_condition = params.urlencode()

    return render(
        request, 'book.html', {
            'book_list': book_list,
            'page_html': html,
            'list_condition': list_condition
        })
Exemplo n.º 2
0
def UserInfo(request):

    obj = models.UserInfo.objects.all()
    pager_obj = Pagination(request.GET.get('page', 1), len(obj), request.path_info,request.GET)
    obj=obj[pager_obj.start:pager_obj.end]
    html = pager_obj.page_html()
    return render(request, 'userinfo.html', {'obj': obj, "page_html": html})
Exemplo n.º 3
0
def hosts(request):

    pager_obj = Pagination(request.GET.get('page',1),len(HOST_LIST),request.path_info,request.GET)
    host_list = HOST_LIST[pager_obj.start:pager_obj.end]
    # host_list = models.Host.objects.all()[pager_obj.start:pager_obj.end]

    # condition_dict = {}
    # source=2&status=2&gender=2&consultant=1&page=1
    # for k,v in request.GET.items():
    #     if k == 'page':
    #         continue
    #     condition_dict[k] = v
    # host_list = models.Host.objects.filter(**condition_dict)[pager_obj.start:pager_obj.end]

    html = pager_obj.page_html()


    list_condition = request.GET.urlencode()
    # print(list_condition)
    from django.http import QueryDict # request.GET
    # params = QueryDict(mutable=True)

    # request.GET是一个QueryDict类型,
    # 默认不可修改,request.GET._mutable = True
    # request.GET.urlencode() 用于讲k,v构造成URL格式字符串
    # request.GET['page'] = 666

    # _list_filter=page%3D5%26id__gt%3D4
    params = QueryDict(mutable=True)
    params['_list_filter'] = request.GET.urlencode()
    list_condition = params.urlencode()

    return render(request,'hosts.html',{'host_list':host_list,"page_html":html,'list_condition':list_condition})
Exemplo n.º 4
0
    def __init__(self, config, querySet):
        self.config = config

        self.list_display = config.get_list_display()
        self.model_class = config.model_class
        self.request = config.request
        self.show_add_btn = config.get_show_add_btn()

        # action
        self.action_list = config.get_action_list()
        self.show_action_list = config.get_show_action_list()
        # search
        self.show_search_form = config.get_show_search_form()
        self.search_form_val = config.request.GET.get(config.search_key, '')

        # 组合条件
        self.comb_filter = config.get_comb_filter()
        self.edit_link = config.get_edit_link()
        self.show_comb_filter = config.get_show_comb_filter()

        from utils.pager import Pagination
        current_page = self.request.GET.get('page', 1)
        total_count = querySet.count()
        pager_obj = Pagination(current_page, total_count,
                               self.request.path_info, self.request.GET)
        self.pager_obj = Pagination(current_page, total_count,
                                    self.request.path_info, self.request.GET)
        self.data_list = querySet[pager_obj.start:pager_obj.end]
Exemplo n.º 5
0
def event_manage(request):
    eventinfor_list= Event.objects.all().count()
    EVENT_LIST= Event.objects.all()
    username = request.session.get("user")
    pager_obj = Pagination(request.GET.get('page', 1), eventinfor_list, request.path_info, request.GET)
    event_list = EVENT_LIST[pager_obj.start:pager_obj.end]
    html = pager_obj.page_html()
    return render(request, 'event_manage.html', {'user': username,"events":event_list,"page_html": html})
Exemplo n.º 6
0
def guest_manage(request):
    guestinfor_list= Guest.objects.all().count()
    GUEST_LIST= Guest.objects.all()
    username = request.session.get("user")
    pager_obj = Pagination(request.GET.get('page', 1), guestinfor_list, request.path_info, request.GET)
    guest_list = GUEST_LIST[pager_obj.start:pager_obj.end]
    html = pager_obj.page_html()
    return render(request, 'guest_manage.html', {'user': username,"guests":guest_list,"page_html": html})
Exemplo n.º 7
0
def users(request):
    pager_obj = Pagination(request.GET.get('page', 1), len(USER_LIST),
                           request.path_info, request.GET)
    user_list = USER_LIST[pager_obj.start:pager_obj.end]
    html = pager_obj.page_html()
    return render(request, 'users.html', {
        'user_list': user_list,
        'page_html': html
    })
Exemplo n.º 8
0
def hosts(request):
    pager_obj = Pagination(request.GET.get('page', 1), len(HOST_LIST),
                           request.path_info)
    host_list = HOST_LIST[pager_obj.start:pager_obj.end]
    html = pager_obj.page_html()
    return render(request, 'hosts.html', {
        'host_list': host_list,
        'page_html': html
    })
Exemplo n.º 9
0
def trouble_report(request, **kwargs):
    '''故障处理报告:超级管理员才能看到'''
    # 分页
    base_url = reverse('report', kwargs=kwargs)
    data_count = Trouble.objects.all().count()
    trouble_list = Trouble.objects.filter().order_by('status').only(
        'id', 'title', 'status', 'ctime', 'processer')
    page_obj = Pagination(data_count, request.GET.get('p'))
    data = trouble_list[page_obj.start():page_obj.end()]
    page_str = page_obj.page_str(base_url)
    return render(request, 'backend_trouble_report.html', {
        'data': data,
        'page_str': page_str,
    })
Exemplo n.º 10
0
def host(request):
    # 统计出一共有多少条 数据
    all_count = models.Host.objects.all().count()
    # page_obj = Pagination 方法需要 3个 参数(请求当前页码,总数据条数,该应用路径)
    # page_obj = Pagination(request.GET.get('page'),all_count,'/host/')
    page_obj = Pagination(request.GET.get('page'), all_count,
                          request.path_info)

    # host_list = models.Host.objects.all()[本页内容的开始,本页内容的结束]
    host_list = models.Host.objects.all()[page_obj.start:page_obj.end]

    # render(request, 页面, {展示内容,展示的 html页码})
    return render(request, 'host.html', {
        'host_list': host_list,
        'page_html': page_obj.page_html()
    })
Exemplo n.º 11
0
def index(request, *args, **kwargs):
    type_choices = models.Article.type_choices
    if kwargs:
        article_type_id = kwargs['type_id']
        base_url = reverse('index', kwargs=kwargs)
    else:
        article_type_id = None
        base_url = ""
    article_count = models.Article.objects.filter(**kwargs).count()
    page_obj = Pagination(total_count=article_count,
                          item_no=5,
                          current_page=request.GET.get('p'),
                          url=base_url)
    article_list = models.Article. \
                          objects. \
                          filter(**kwargs).order_by('-nid')[page_obj.start:page_obj.end]

    data = {
        'article_list': article_list,
        'article_type_id': article_type_id,
        'type_choices': type_choices,
        'page_obj': page_obj,
    }

    return render(request, 'index.html', data)
Exemplo n.º 12
0
    def __init__(self, config, queryset):
        self.config = config

        self.list_display = config.get_list_display()
        self.model_class = config.model_class
        self.request = config.request
        self.show_add_btn = config.get_show_add_btn()
        self.actions = config.get_actions()
        self.show_actions = config.get_show_actions()
        self.comb_filter = config.get_comb_filter()  #构造方法中写了comb_filter
        self.show_comb_filter = config.get_show_comb_filter()
        self.edit_link = config.get_edit_link()

        #模糊关键字搜索
        self.show_search_form = config.get_show_search_form()
        self.search_form_val = config.request.GET.get(config.search_key, '')

        # 处理分页
        from utils.pager import Pagination
        current_page = self.request.GET.get('page', 1)
        total_count = queryset.count()

        page_obj = Pagination(current_page,
                              total_count,
                              self.request.path_info,
                              self.request.GET,
                              per_page_count=8,
                              max_pager_count=3)
        self.page_obj = page_obj

        self.data_list = queryset[page_obj.start:page_obj.end]
Exemplo n.º 13
0
    def __init__(self, config, queryset):
        self.config = config

        self.list_display = config.get_list_display()
        self.model_class = config.model_class
        self.request = config.request
        self.queryset = queryset
        self.show_add_btn = config.get_show_add_btn()

        # 组合搜索
        self.comb_filter = config.get_comb_filter()
        # actions
        self.actions = config.get_actions()
        self.show_actions = config.get_show_actions()

        # 搜索功能
        self.show_search_form = config.get_show_search_form()
        self.search_form_val = config.request.GET.get(config.search_key, '')
        # 显示分页功能
        current_page = self.request.GET.get('page', 1)
        total_count = queryset.count()
        from utils.pager import Pagination
        page_obj = Pagination(current_page, total_count, self.request.path_info, self.request.GET, per_page_count=2)

        self.page_obj = page_obj

        self.data_list = queryset[page_obj.start:page_obj.end]
Exemplo n.º 14
0
    def __init__(self, config, queryset):
        self.config = config  #stark.py中写了派生类的话就是那个类,没写的话默认就是StarkConfig
        self.list_display = config.get_list_display()
        self.edit_link = config.get_edit_link()
        self.model_class = config.model_class  #数据库的表
        self.request = config.request  #StarkConfig中默认是None,不过程序运行后就会有
        self.show_add_btn = config.get_show_add_btn()
        # 搜索框
        self.show_search_form = config.get_show_search_form()
        self.search_form_val = config.request.GET.get(
            config.search_key, '')  #搜索关键字“_q”,首次访问网页默认是空
        # 批量操作
        self.actions = config.get_actions()  #得到派生类中写的actions的内容[]
        self.show_actions = config.get_show_actions()  #操作框
        #组合搜索
        self.show_comb_filter = config.get_show_comb_filter()
        self.comb_filter = config.get_comb_filter()

        from utils.pager import Pagination
        #分页器
        current_page = self.request.GET.get('page', 1)  #得到传入的page,没有默认为第一页
        total_count = queryset.count()  #要显示的数据的量,queryset在视图函数中有数据库操作的赋值
        page_obj = Pagination(current_page,
                              total_count,
                              self.request.path_info,
                              self.request.GET,
                              per_page_count=5)
        #当前页         数据量        当前url不带问号         ?后面的条件内容      设定的每页显示的数据量条数
        self.page_obj = page_obj  #得到最终生成的分页器对象

        self.data_list = queryset[page_obj.start:
                                  page_obj.end]  #得到分页后的数据,用于页面展示
Exemplo n.º 15
0
Arquivo: v1.py Projeto: oridn/pro-crm
    def __init__(self,config,queryset):
        self.config = config

        # [checkbox,'id','name',edit,del]
        self.list_display = config.get_list_display()
        self.model_class = config.model_class
        self.request = config.request
        self.show_add_btn = config.get_show_add_btn()
        self.actions = config.get_actions()
        self.show_actions = config.get_show_actions()
        self.comb_filter = config.get_comb_filter()

        self.edit_link=config.get_edit_link()

        # 搜索用
        self.show_search_form = config.get_show_search_form()
        self.search_form_val = config.request.GET.get(config.search_key,'')

        from utils.pager import Pagination
        current_page = self.request.GET.get('page', 1)
        total_count = queryset.count()
        page_obj = Pagination(current_page, total_count, self.request.path_info, self.request.GET, per_page_count=10)
        self.page_obj = page_obj

        self.data_list = queryset[page_obj.start:page_obj.end]
Exemplo n.º 16
0
def host(request):
    ##创建主机测试数据
    # for i in range(302):
    #     dic ={'hostname':'c%s.com' %(i,),"ip":'1.1.1.1','port':80}
    #     models.Host.objects.create(**dic)
    #
    # # return render(request,'host.html')
    # return HttpResponse("创建成功")




    all_count = models.Host.objects.all().order_by('-id').count()
    per_page_count = request.GET.get('items')
    if not per_page_count:
        per_page_count = 20
        print("check per_page_count ", per_page_count)
    else:
        per_page_count = int(per_page_count)
        print(per_page_count,type(per_page_count))
    # page_obj = Pagination(request.GET.get('page'),all_count,'/host/')
    page_obj = Pagination(all_count,per_page_count,request.GET.get('page'),request_url=request.path_info)
    host_list = models.Host.objects.all().order_by('-id')[page_obj.current_page_start_item:page_obj.current_page_end_item]



    return render(request, 'host.html', {'host_list': host_list, 'page_html': page_obj.page_html})
Exemplo n.º 17
0
def user(request):

    page_obj = Pagination(request, UserInfo)

    return render(request, 'user.html', {
        'user_list': page_obj.obj_list_html,
        'page_html': page_obj.page_html
    })
Exemplo n.º 18
0
def hosts(request):
    HOST_LIST = models.UserInfo.objects.all()
    """
    自定义分页组件的使用方法:
        pager_obj = Pagination(request.GET.get('page',1),len(HOST_LIST),request.path_info)
        host_list = HOST_LIST[pager_obj.start:pager_obj.end]
        html = pager_obj.page_html()
        return render(request,'hosts.html',{'host_list':host_list,"page_html":html})
    """
    pager_obj = Pagination(request.GET.get("page", 1), len(HOST_LIST),
                           request.path_info)
    host_list = HOST_LIST[pager_obj.start:pager_obj.end]
    html = pager_obj.page_html()
    return render(request, "host.html", {
        "host_list": host_list,
        "page_html": html
    })
Exemplo n.º 19
0
def trouble_list(request, **kwargs):
    '''显示报障单'''
    # 分页
    current_user = request.session.get('username')
    base_url = reverse('trouble', kwargs=kwargs)
    data_count = Trouble.objects.filter(user__username=current_user).count()
    trouble_list = Trouble.objects.filter(
        user__username=current_user).order_by('status').only(
            'id', 'title', 'status', 'ctime', 'processer')
    page_obj = Pagination(data_count, request.GET.get('p'))
    data = trouble_list[page_obj.start():page_obj.end()]
    page_str = page_obj.page_str(base_url)
    return render(request, 'backend_trouble_list.html', {
        'title': '后台管理',
        'data': data,
        'page_str': page_str,
    })
Exemplo n.º 20
0
    def __init__(self, model_class_cfg, result_list, request):
        """
        :param config: 处理每个表增伤改查功能的对象
        :param result_list: 从数据库查询到的数据
        """
        self.config = model_class_cfg
        self.model_class = model_class_cfg.model_class
        self.request = request
        self.result_list = result_list
        self.search_list = model_class_cfg.search_list
        self.search_value = self.request.GET.get("key", "")
        self.action_list = model_class_cfg.action_list
        self.comb_filter = model_class_cfg.comb_filter

        page_obj = Pagination(self.request, self.result_list)  ##实例化页码对象
        self.page_list = page_obj.page_obj_list()  ##每页的 20对象
        self.page_html = mark_safe(page_obj.bootstrap_page_html())  ##实例化页码导航
Exemplo n.º 21
0
 def page(self):
     total_count = self.model_class.objects.all().count()
     current_page = self.request.GET.get("page", 1)
     page_obj = Pagination(current_page,
                           total_count,
                           self.request.path_info,
                           self.request.GET,
                           per_page_num=5)
     self.page_obj = page_obj
     return self.page_obj
Exemplo n.º 22
0
def hosts(request):
    pager_obj = Pagination(request.GET.get('page', 1), len(HOST_LIST),
                           request.path_info, request.GET)
    host_list = HOST_LIST[pager_obj.start:pager_obj.end]
    html = pager_obj.page_html()
    list_condition = request.GET.urlencode()
    print(list_condition)
    from django.http import QueryDict
    params = QueryDict(mutable=True)
    params['_list_filter'] = request.GET.urlencode()
    list_condition = params.urlencode()
    print(params)
    print(list_condition)
    return render(
        request, 'hosts.html', {
            'list_condition': list_condition,
            'host_list': host_list,
            "page_html": html
        })
Exemplo n.º 23
0
def host(request):
    # 统计出一共有多少条 数据
    all_count = models.Host.objects.all().count()
    #                                   current_page, total_count, base_url,
    # page_obj = Pagination 方法需要 3个 参数(请求当前页码,总数据条数,该应用路径)
    # page_obj = Pagination(request.GET.get('page'),all_count,'/host/')
    page_obj = Pagination(request.GET.get('page'), all_count,
                          request.path_info)
    # print(request.GET, '*' * 10)  # <QueryDict: {'page': ['1']}>
    # print(request.GET.get, '*' * 10) # <bound method MultiValueDict.get of <QueryDict: {'page': ['1']}>>
    # print(request.path_info, '*' * 10)  # /host/

    # host_list = models.Host.objects.all()[本页内容的开始,本页内容的结束]
    host_list = models.Host.objects.all()[page_obj.start:page_obj.end]
    # print(models.Host.objects.all()[0:5])

    # render(request, 页面, {展示内容,展示的 html页码})
    return render(request, 'host.html', {
        'host_list': host_list,
        'page_html': page_obj.page_html()
    })
Exemplo n.º 24
0
    def __init__(self,config,result_list,request):
        """
        :param config: 处理每个表增伤改查功能的对象
        :param result_list: 从数据库查询到的数据
        """
        self.config = config

        self.request = request

        all_count = result_list.count()
        page_obj = Pagination(request.GET.get('page'), all_count, request.path_info)
        self.result_list = result_list[page_obj.start:page_obj.end]
        self.page_obj = page_obj
Exemplo n.º 25
0
def role(request):
    all_count = Role.objects.all().order_by('-id').count()
    per_page_count = request.GET.get('items')
    if not per_page_count:
        per_page_count = 20
        # print("check per_page_count ", per_page_count)
    else:
        per_page_count = int(per_page_count)
        # print(per_page_count,type(per_page_count))

    page_obj = Pagination(all_count,per_page_count,request.GET.get('page'),request_url=request.path_info)
    role_list = Role.objects.all().order_by('-id')[page_obj.current_page_start_item:page_obj.current_page_end_item]

    return render(request, 'role.html', {'role_list': role_list, 'page_html': page_obj.page_html})
Exemplo n.º 26
0
    def __init__(self, config, querySet):
        # 当前操作的StarkConfig对象
        self.config = config
        # 所展示的字段
        self.list_display = config.get_list_display()
        # 当前所操作的model类
        self.model_class = config.model_class
        # 获取request
        self.request = config.request

        # 总记录数 分页时用到
        total_count = len(querySet)
        self.total_count = total_count

        # 当前页
        self.current_page = config.request.GET.get('page', 1)

        # 分页对象
        pageObj = Pagination(self.current_page,
                             self.total_count,
                             self.request.path_info,
                             self.request.GET,
                             per_page_count=1)

        self.pageObj = pageObj

        # 每一页所显示的记录数
        self.per_page_data_list = querySet[self.pageObj.start:self.pageObj.end]

        # 前端页面添加按钮的url
        self.add_url = config.get_add_url()

        # 是否有添加按钮
        self.add_btn = config.get_add_btn()

        # 是否显示搜索框
        self.show_search_form = config.get_show_search_form()
        # 搜索框的value和url同步
        self.search_form_val = self.request.GET.get(config.search_key, ' ')

        # 是否显示action(批量操作)
        self.show_action = config.get_show_action()

        # 获取action_fuc 列表
        self.action_func_list = config.get_action_func_list()

        # 联合搜索option对象集合
        self.combine_seach = config.get_combine_seach()
Exemplo n.º 27
0
def article_list(request, *args, **kwargs):
    """
    list the articles by conditions
    :param request: user_info
    :param args:
    :param kwargs: type_id, category_id
    :return: articles
    """
    conditions = {}
    blog_id = request.session.get('user_info')['blog__nid']
    print(blog_id)
    for k, v in kwargs.items():
        if v == '0':
            pass
        else:
            try:
                v = int(v)
            except Exception as e:
                print(e)
            else:
                conditions[k] = int(v)
    conditions['blog_id'] = blog_id

    articles_counts = models.Article.objects.filter(**conditions).count()

    category_list = models.Category.objects.filter(blog_id=blog_id).only(
        'nid', 'title')
    type_list = models.Article.type_choices
    pager = Pagination(
        total_count=articles_counts,
        current_page=request.GET.get('p'),
        item_no=5,
        url='/backend/article-%s-%s.html' %
        (kwargs.get('category_id', 0), kwargs.get('type_id', 0)))
    articles = models.Article.objects.filter(
        **conditions).order_by('-nid')[pager.start:pager.end]

    data = {
        'articles': articles,
        'conditions': conditions,
        'category_list': category_list,
        'type_list': type_list,
        'pager': pager,
    }
    return render(request, 'backend/backend_article_list.html', data)
Exemplo n.º 28
0
def user(request):

    # 获取session中菜单信息,自动生成二级菜单【默认选中,默认展开】
    # menu_list = request.session.get(settings.PERMISSION_MENU_SESSION_KEY)
    # print(menu_list)
    # per_dict = {}
    #
    # current_url = request.path_info
    # for item in menu_list:
    #
    #     if item['id'] == item['pid']:
    #         per_dict[item['id']] = item
    #
    # for item in menu_list:
    #     reg = settings.REX_FORMAT % (item['url'])
    #     if not re.match(reg, current_url):
    #         continue
    #     # 匹配成功
    #     if item['pid']:
    #         per_dict[item['pid']]['active'] = True
    #     else:
    #         item['active'] = True
    # for item in per_dict.values():
    #     print(item)



    all_count = UserInfo.objects.all().order_by('-id').count() ####查到的总数
    per_page_count = request.GET.get('items')  ###每页显示条数
    get_page = request.GET.get('page')
    get_url = request.path_info
    if not per_page_count:
        per_page_count = 20  ##默认显示条数
    else:
        per_page_count = int(per_page_count)
    page_obj = Pagination(all_count,per_page_count,get_page,request_url=get_url)
    user_list = UserInfo.objects.all().order_by('-id')[page_obj.current_page_start_item:page_obj.current_page_end_item]


    return render(request, 'user.html', {'user_list': user_list, 'page_html': page_obj.page_html})
    return render(request, 'user.html')
Exemplo n.º 29
0
def ArticleDetail(request, site, nid):
    """
    :param request:
    :param site:
    :param nid:
    :return:
    """
    base_url = "%s.html" % nid
    blog = models.Blog.objects.filter(site=site).select_related('user').first()
    tag_list = models.Tag.objects.filter(blog=blog)
    date_list = models.Article.objects.raw('''
        select
        nid,
        count(nid) as num,
        strftime("%Y-%m",create_time) as ctime
        from repository_article 
        group by strftime("%Y-%m",create_time)
        ''')
    article = models.Article.objects.filter(blog=blog, nid=nid).select_related(
        'category', 'articledetail').first()
    category_list = models.Category.objects.filter(blog=blog)
    comments_count = models.Comment.objects.filter(article=article).count()
    page_obj = Pagination(total_count=comments_count,
                          item_no=4,
                          current_page=request.GET.get('p'),
                          url=base_url)

    comment_list = models.Comment.objects.filter(
        article=article).select_related('reply')[page_obj.start:page_obj.end]

    data = {
        'blog': blog,
        'article': article,
        'comment_list': comment_list,
        'page_obj': page_obj,
        'tag_list': tag_list,
        'category_list': category_list,
        'date_list': date_list,
    }
    return render(request, 'article_detail.html', data)
Exemplo n.º 30
0
    def __init__(self, config, queryset):
        self.config = config

        self.list_display = config.get_list_display()
        self.model = config.model
        self.request = config.request
        # 添加按钮
        self.show_add_btn = config.get_show_add_btn()
        self.add_url = config.get_add_url()
        # 批量操作
        self.show_action_btn = config.get_show_action_btn()
        self.action_display = config.get_action_display()
        # 过滤相关
        self.query_param_key = config._query_param_key
        self.show_filter_btn = config.get_show_filter_btn()
        self.filter_btn_val = config.request.GET.get(config._query_param_key,
                                                     '')
        # 组合搜索
        self.show_comb_filter = config.get_show_comb_filter()
        self.comb_filter = config.get_comb_filter()
        # 是否可以编辑
        self.edit_display = config.get_edit_display()

        from utils.pager import Pagination
        # 获取当前页面,默认为1
        current_page = self.request.GET.get('page', 1)
        # 获取总数
        total_count = queryset.count()
        # 实例化Pagination对象
        page_obj = Pagination(current_page,
                              total_count,
                              self.request.path_info,
                              self.request.GET,
                              per_page_count=10,
                              max_pager_count=11)
        self.page_obj = page_obj

        # 根据分页功能,截取data_list的开始和结束
        self.data_list = queryset[page_obj.start:page_obj.end]