()
return make_response(render_template('index.html', **context))
Renders a list of all graphics for local testing.
Renders a list of all graphics for local testing.
Renders a list of all graphics for local testing .
def _graphics_list():
    """
    Renders a list of all graphics for local testing.
    """
    context = make_context()
    context['graphics'] = []
    context['templates'] = []

    graphics = glob('%s/*' % app_config.GRAPHICS_PATH)

    for graphic in graphics:
        name = graphic.split('%s/' % app_config.GRAPHICS_PATH)[1].split('/child.html')[0]
        context['graphics'].append(name)

    context['graphics'].sort();

    context['graphics_count'] = len(context['graphics'])

    templates = glob('%s/*' % app_config.TEMPLATES_PATH)

    for template in templates:
        name = template.split('%s/' % app_config.TEMPLATES_PATH)[1]

        if name.startswith('_'):
            continue

        context['templates'].append(name)

    context['templates'].sort()

    context['templates_count'] = len(context['templates'])

    return make_response(render_template('index.html', **context))
def _graphics_list ( ) : context = make_context ( ) context [ 'graphics' ] = [ ] context [ 'templates' ] = [ ] graphics = glob ( '%s/*' % app_config . GRAPHICS_PATH ) for graphic in graphics : name = graphic . split ( '%s/' % app_config . GRAPHICS_PATH ) [ 1 ] . split ( '/child.html' ) [ 0 ] context [ 'graphics' ] . append ( name ) context [ 'graphics' ] . sort ( ) context [ 'graphics_count' ] = len ( context [ 'graphics' ] ) templates = glob ( '%s/*' % app_config . TEMPLATES_PATH ) for template in templates : name = template . split ( '%s/' % app_config . TEMPLATES_PATH ) [ 1 ] if name . startswith ( '_' ) : continue context [ 'templates' ] . append ( name ) context [ 'templates' ] . sort ( ) context [ 'templates_count' ] = len ( context [ 'templates' ] ) return make_response ( render_template ( 'index.html' , * * context ) )