Ejemplo n.º 1
0
def get_styleguide_templates():
    """Return tuples of (display name, slug) for found styleguide templates"""
    templates = []
    for slug in utils.get_styleguide_templates():
        name = defaultfilters.title(slug.replace('-', ' '))
        templates.append((name, slug))
    return templates
Ejemplo n.º 2
0
def get_styleguide_templates():
    """Return tuples of (display name, slug) for found styleguide templates"""
    templates = []
    for slug, sub_slugs in utils.get_styleguide_templates().items():
        name = defaultfilters.title(slug.replace('-', ' '))
        templates.append((name, slug, sub_slugs))

    templates.sort()
    templates.insert(0, ("Introduction", "", []))

    return templates
Ejemplo n.º 3
0
 def handle(self, *args, **options):
     app_config = apps.get_app_config('styleguide')
     template_dir = os.path.join(app_config.path, "templates/styleguide")
     for slug in get_styleguide_templates([template_dir]):
         print(slug)