<s> from django . contrib import messages <EOL> from django . shortcuts import redirect <EOL> from django . views . generic . simple import direct_to_template <EOL> from django . views . decorators . cache import never_cache <EOL> from mturk . toprequesters . reports import ToprequestersReport <EOL> @ never_cache <EOL> def top_requesters ( request , tab = None ) : <EOL> """<STR_LIT>""" <EOL> try : <EOL> tab = int ( tab ) <EOL> except Exception : <EOL> pass <EOL> if tab not in ToprequestersReport . values : <EOL> messages . warning ( request , '<STR_LIT>' . format ( tab ) ) <EOL> return redirect ( '<STR_LIT>' , <EOL> tab = ToprequestersReport . values [ <NUM_LIT:0> ] ) <EOL> ctx = { <EOL> '<STR_LIT:title>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : ToprequestersReport . display_names , <EOL> '<STR_LIT>' : tab , <EOL> '<STR_LIT>' : ToprequestersReport . get_report_meta ( tab ) , <EOL> } <EOL> return direct_to_template ( request , '<STR_LIT>' , ctx ) </s>
