diff --git a/pattern_library/management/commands/render_patterns.py b/pattern_library/management/commands/render_patterns.py index 7f3caeed..32268b7a 100644 --- a/pattern_library/management/commands/render_patterns.py +++ b/pattern_library/management/commands/render_patterns.py @@ -5,11 +5,7 @@ from django.test.client import RequestFactory from pattern_library import get_base_template_names, get_pattern_base_template_name -from pattern_library.utils import ( - get_pattern_context, - render_pattern, - get_renderer, -) +from pattern_library.utils import get_pattern_context, get_renderer, render_pattern class Command(BaseCommand): diff --git a/pattern_library/utils.py b/pattern_library/utils.py index 1edf1f3f..9697c39a 100644 --- a/pattern_library/utils.py +++ b/pattern_library/utils.py @@ -8,6 +8,7 @@ from django.template.loader import get_template, render_to_string from django.template.loader_tags import ExtendsNode from django.template.loaders.app_directories import get_app_template_dirs +from django.utils.html import escape from django.utils.safestring import mark_safe import markdown @@ -22,9 +23,6 @@ from pattern_library.exceptions import TemplateIsNotPattern -from django.utils.html import escape - - def path_to_section(): section_config = get_sections() sections = {} diff --git a/pattern_library/views.py b/pattern_library/views.py index fd9b1955..99d1dccb 100644 --- a/pattern_library/views.py +++ b/pattern_library/views.py @@ -16,10 +16,10 @@ get_pattern_config_str, get_pattern_context, get_pattern_markdown, + get_renderer, get_sections, is_pattern, render_pattern, - get_renderer, ) diff --git a/tests/tests/test_utils.py b/tests/tests/test_utils.py index 682f9aef..fe3191c6 100644 --- a/tests/tests/test_utils.py +++ b/tests/tests/test_utils.py @@ -5,8 +5,8 @@ from pattern_library.utils import ( get_pattern_config_str, - get_template_dirs, get_renderer, + get_template_dirs, )