File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed
pattern_library/templatetags Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change 1- # Template tags for django-pattern-library
1+ # Template tags for django-pattern-library
Original file line number Diff line number Diff line change 11from django import template
2- from django .utils .safestring import mark_safe
32from django .templatetags .static import static
3+ from django .utils .safestring import mark_safe
4+
45from pattern_library import get_setting
56
67register = template .Library ()
@@ -25,15 +26,17 @@ def pattern_library_custom_css():
2526 css_content = []
2627
2728 # Include external CSS file if specified
28- custom_css_path = get_setting (' CUSTOM_CSS' )
29+ custom_css_path = get_setting (" CUSTOM_CSS" )
2930 if custom_css_path :
3031 try :
3132 css_url = static (custom_css_path )
32- css_content .append (f'<link rel="stylesheet" type="text/css" href="{ css_url } ">' )
33+ css_content .append (
34+ f'<link rel="stylesheet" type="text/css" href="{ css_url } ">'
35+ )
3336 except Exception :
3437 pass # If static file handling fails, just skip the external file
3538
36- return mark_safe (' \n ' .join (css_content ))
39+ return mark_safe (" \n " .join (css_content ))
3740
3841
3942@register .simple_tag
@@ -45,4 +48,4 @@ def pattern_library_site_title():
4548 {% load pattern_library_tags %}
4649 {% pattern_library_site_title %}
4750 """
48- return get_setting (' SITE_TITLE' )
51+ return get_setting (" SITE_TITLE" )
You can’t perform that action at this time.
0 commit comments