code: def application_state(context, application):
      
      new_context = {
          'roles': context['roles'],
          'org_name': context['org_name'],
          'application': application,
      }
      nodelist = template.loader.get_template(
          'kgapplications/%s_common_state.html' % application.type)
      output = nodelist.render(new_context)
      return output
docs: Render current state of application, verbose.