<s> from __future__ import unicode_literals <EOL> from django . shortcuts import render <EOL> from django . contrib . auth . decorators import login_required <EOL> from ... core . utils . paginator . infinite_paginator import paginate <EOL> from . . models import Topic <EOL> @ login_required <EOL> def index ( request ) : <EOL> topics = Topic . objects . for_access ( user = request . user ) . for_unread ( user = request . user ) . with_bookmarks ( user = request . user ) <EOL> page = paginate ( request , query_set = topics , lookup_field = "<STR_LIT>" , page_var = '<STR_LIT>' ) <EOL> next_page_pk = None <EOL> if page : <EOL> next_page_pk = page [ - <NUM_LIT:1> ] . pk <EOL> context = { <EOL> '<STR_LIT>' : page , <EOL> '<STR_LIT>' : next_page_pk <EOL> } <EOL> return render ( request , '<STR_LIT>' , context ) </s>
