<s> from django . contrib . auth . decorators import login_required <EOL> from django . shortcuts import render <EOL> from rapidsms . contrib . messagelog . tables import MessageTable <EOL> from rapidsms . contrib . messagelog . models import Message <EOL> from rapidsms import settings <EOL> from django_tables2 import RequestConfig <EOL> @ login_required <EOL> def message_log ( request ) : <EOL> qset = Message . objects . all ( ) <EOL> qset = qset . select_related ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> template = "<STR_LIT>" <EOL> messages_table = MessageTable ( qset , template = template ) <EOL> paginate = { "<STR_LIT>" : settings . PAGINATOR_OBJECTS_PER_PAGE } <EOL> RequestConfig ( request , paginate = paginate ) . configure ( messages_table ) <EOL> return render ( request , "<STR_LIT>" , { <EOL> "<STR_LIT>" : messages_table , <EOL> } ) </s>
