@register.tag
@blocktag(end_prefix=u'end_')
def for_review_request_fieldset(context, nodelist, review_request_details):
 s = []
 is_first = True
 review_request = review_request_details.get_review_request()
 user = context[u'request'].user
 fieldset_classes = get_review_request_fieldsets(include_main=False)
 for fieldset_cls in fieldset_classes:
  try:
   if (not fieldset_cls.is_empty()):
    try:
     fieldset = fieldset_cls(review_request_details)
    except Exception as e:
     logging.error(u'Error instantiating ReviewRequestFieldset %r: %s', fieldset_cls, e, exc_info=1)
    context.push()
    context.update({u'fieldset': fieldset, u'show_fieldset_required': (fieldset.show_required and (review_request.status == ReviewRequest.PENDING_REVIEW) and review_request.is_mutable_by(user)), u'forloop': {u'first': is_first}})
    s.append(nodelist.render(context))
    context.pop()
    is_first = False
  except Exception as e:
   logging.error(u'Error running is_empty for ReviewRequestFieldset %r: %s', fieldset_cls, e, exc_info=1)
 return u''.join(s)

@ register . tag @ blocktag ( end_prefix = u'end_' ) def for_review_request_fieldset ( context , nodelist , review_request_details ) : s = [ ] is_first = True review_request = review_request_details . get_review_request ( ) user = context [ u'request' ] . user fieldset_classes = get_review_request_fieldsets ( include_main = False ) for fieldset_cls in fieldset_classes : try : if ( not fieldset_cls . is_empty ( ) ) : try : fieldset = fieldset_cls ( review_request_details ) except Exception as e : logging . error ( u'Error instantiating ReviewRequestFieldset %r: %s' , fieldset_cls , e , exc_info = 1 ) context . push ( ) context . update ( { u'fieldset' : fieldset , u'show_fieldset_required' : ( fieldset . show_required and ( review_request . status == ReviewRequest . PENDING_REVIEW ) and review_request . is_mutable_by ( user ) ) , u'forloop' : { u'first' : is_first } } ) s . append ( nodelist . render ( context ) ) context . pop ( ) is_first = False except Exception as e : logging . error ( u'Error running is_empty for ReviewRequestFieldset %r: %s' , fieldset_cls , e , exc_info = 1 ) return u'' . join ( s )
loops through all fieldsets .