(record, scaffold_base)
return
Create a display template for RECORD.
Create a display template for RECORD.
Create a display template for RECORD .
def create_display_template_for(record, scaffold_base):
    """
    Create a display template for RECORD.
    """
    write('Creating display template for {0}'.format(record))
    name = record.get_api_name()

    # 1. Locate the records template directory
    templates = _get_template_dir_from_record(record)
    records = templates/'records'
    if not records:
        records.mkdir()

    display_template = scaffold_base/'record_templates/record_display.jinja2'
    template = records/'{0}.html'.format(name)
    fields = _strip_non_user_fields(record.build_field_schema())
    contents = mold.cast(display_template, record=record, fields=fields)
    # We often get lots of lines containing just spaces as a Jinja2
    # artifact. Lose them.
    contents = "\n".join(
        line for line in contents.split("\n") if line.strip()
    )
    template << contents
    return
def create_display_template_for ( record , scaffold_base ) : write ( 'Creating display template for {0}' . format ( record ) ) name = record . get_api_name ( ) # 1. Locate the records template directory templates = _get_template_dir_from_record ( record ) records = templates / 'records' if not records : records . mkdir ( ) display_template = scaffold_base / 'record_templates/record_display.jinja2' template = records / '{0}.html' . format ( name ) fields = _strip_non_user_fields ( record . build_field_schema ( ) ) contents = mold . cast ( display_template , record = record , fields = fields ) # We often get lots of lines containing just spaces as a Jinja2 # artifact. Lose them. contents = "\n" . join ( line for line in contents . split ( "\n" ) if line . strip ( ) ) template << contents return