@check_login_required
@check_local_site_access
def submitter(request, username, grid=None, template_name=u'datagrids/datagrid.html', local_site=None):
 if local_site:
  try:
   user = local_site.users.get(username=username)
  except User.DoesNotExist:
   raise Http404
 else:
  user = get_object_or_404(User, username=username)
 if ((grid is None) or (grid == u'review-requests')):
  datagrid_cls = UserPageReviewRequestDataGrid
 elif (grid == u'reviews'):
  datagrid_cls = UserPageReviewsDataGrid
 else:
  raise Http404
 datagrid = datagrid_cls(request, user, local_site=local_site)
 datagrid.tabs = [(UserPageReviewRequestDataGrid.tab_title, local_site_reverse(u'user', local_site=local_site, args=[username])), (UserPageReviewsDataGrid.tab_title, local_site_reverse(u'user-grid', local_site=local_site, args=[username, u'reviews']))]
 return datagrid.render_to_response(template_name)

@ check_login_required @ check_local_site_access def submitter ( request , username , grid = None , template_name = u'datagrids/datagrid.html' , local_site = None ) : if local_site : try : user = local_site . users . get ( username = username ) except User . DoesNotExist : raise Http404 else : user = get_object_or_404 ( User , username = username ) if ( ( grid is None ) or ( grid == u'review-requests' ) ) : datagrid_cls = UserPageReviewRequestDataGrid elif ( grid == u'reviews' ) : datagrid_cls = UserPageReviewsDataGrid else : raise Http404 datagrid = datagrid_cls ( request , user , local_site = local_site ) datagrid . tabs = [ ( UserPageReviewRequestDataGrid . tab_title , local_site_reverse ( u'user' , local_site = local_site , args = [ username ] ) ) , ( UserPageReviewsDataGrid . tab_title , local_site_reverse ( u'user-grid' , local_site = local_site , args = [ username , u'reviews' ] ) ) ] return datagrid . render_to_response ( template_name )
display a users profile .