Provide the value, string, and help_text for the template to render.

        help_text is returned if applicable.
18599
def get_select_options(self):
        
        if self.filter_choices:
            return [choice[:4] for choice in self.filter_choices
                    # Display it If the fifth element is True or does not exist
                    if len(choice) < 5 or choice[4]]
1239820
def render(self, name, value, attrs=None, renderer=None):
        
        if not hasattr(self, "editor_manifest"):
            self.editor_manifest = self.init_manifest(self.config_name)

        config = self.editor_manifest.get_config(self.config_name)
        if config.get('embed_config'):
            self.embed_config = True

        context = self.get_context(name, value, attrs)

        return self._render(self.template_name, context, renderer)
634608
def field_help_text
      f = @form.get_current_field
      if f.respond_to?('help_text')
        h = f.help_text
        h = "No help text defined for this field.\nTry F1, or press '?' for key-bindings." unless h
        textdialog "#{h}", :title => "Widget Help Text"
      else
        alert "Could not get field #{f} or does not respond to helptext. Try F1 or '?'"
      end
    end
1293839
def show_input(self, template_helper, language, seed):
        
        header = ParsableText(self.gettext(language, self._header), "rst",
                              translation=self._translations.get(language, gettext.NullTranslations()))
        return str(DisplayableMatchProblem.get_renderer(template_helper).tasks.match(self.get_id(), header))
948496
def render_template(template_name, **context):
    """"""
    tmpl = jinja_env.get_template(template_name)
    context["url_for"] = url_for
    return Response(tmpl.render(context), mimetype="text/html")
795962
def render_text(text, preformatted=False):
    
    builder = HtmlBuilder()
    builder._render_text(text, preformatted=preformatted)
    return builder._to_html()
127023
def help(self):
        ''''''
        cmds = self.get_exposed_cmds()
        t = text_helper.Table(fields=['command', 'doc'],
                              lengths=[50, 85])
        return t.render((reflect.formatted_function_name(x), x.__doc__, )
                        for x in cmds.values())
902064
def help(self, context):
        
        context.info('%s\n%s [global options] [task] [task options]...\n' % (self.name, sys.argv[0]))

        def print_parameter(prn, p):
            if p.description:
                suffix = '    - {0.description}'.format(p)
            else:
                suffix = ''
            if p.constraint is bool:
                prn('    {0.arg_name}'.format(p) + suffix)
            else:
                prn('    {0.arg_name} [{0.value}]'.format(p) + suffix)

        context.info('Global options:')
        for parameter in self.context_parameters.values():
            print_parameter(context.info, parameter)
        context.info()

        context.info('Commands:')
        name_template = '  {0.name:<%d}' % min(max(map(len, self.available_tasks)), 20)
        for task in self.available_tasks.values():
            printer = context.debug if task.hidden else context.info
            if task.description:
                printer((name_template + ' - {0.description}').format(task))
            else:
                printer(name_template.format(task))
            for parameter in task.parameters.values():
                print_parameter(printer, parameter)
1349819
def _render_template(param, username):
    '''
    
    '''
    env = Environment()
    template = env.from_string(param)
    variables = {'username': username}
    return template.render(variables)
398209
def text(self, value, default=''):
        
        for key, val in self.items():
            if val == value:
                return key
        return default
534838
def render(self, template_name, __data=None, **kw):
        ''''''
        return self.template.render(template_name,
                                    **self._vars(__data, **kw))
1374267
def parser_help_text(help_text):
    """"""
    if help_text is None:
        return None, {}

    main_text = ''
    params_help = {}

    for line in help_text.splitlines():
        line = line.strip()
        match = re.search(r':\s*param\s*(?P<param>\w+)\s*:(?P<help>.*)$', line)
        if match:
            params_help[match.group('param')] = match.group('help').strip()
        else:
            main_text += line + ' '

    main_text = main_text.strip()
    return main_text, params_help
292097
def render_name(self, template_name, *context, **kwargs):
        
        loader = self._make_loader()
        template = loader.load_name(template_name)
        return self._render_string(template, *context, **kwargs)
81637
def render_template(self, source, **kwargs_context):
        
        """
        return self.jinja_env.from_string(source).render(kwargs_context)
384584
@Override
	public String getText()
	{
		if(this.target == null)
			return null;
		
			try
			{
				
				//Check if load of template needed
				if((this.template == null || this.template.length() == 0) && this.templateName != null)
				{
					try
					{
						this.template = Text.loadTemplate(templateName);
					}
					catch(Exception e)
					{
						throw new SetupException("Cannot load template:"+templateName,e);
					}
				}
				
				Map<Object,Object> faultMap = JavaBean.toMap(this.target);
				
				
				if(this.argumentTextDecorator != null)
				{
					this.argumentTextDecorator.setTarget(this.target.getArgument());
					
					faultMap.put(this.argumentKeyName, this.argumentTextDecorator.getText());
				}
				
				return Text.format(this.template, faultMap);
			}
			catch (FormatException e)
			{
				throw new FormatFaultException(this.template, e);
			}

		
	}
685620
def load_template_help(builtin):
    """"""

    help_file = "templates/%s-help.yml" % builtin
    help_file = resource_filename(__name__, help_file)
    help_obj = {}
    if os.path.exists(help_file):
        help_data = yaml.safe_load(open(help_file))
        if 'name' in help_data:
            help_obj['name'] = help_data['name']

        if 'help' in help_data:
            help_obj['help'] = help_data['help']

        if 'args' in help_data:
            help_obj['args'] = help_data['args']

    return help_obj
131376
def _render_value(self, val, context, delimiters=None):
        
        if not is_string(val):
            # In case the template is an integer, for example.
            val = self.to_str(val)
        if type(val) is not unicode:
            val = self.literal(val)
        return self.render(val, context, delimiters)