We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 829f7ac commit a471449Copy full SHA for a471449
pattern_library/monkey_utils.py
@@ -15,7 +15,7 @@
15
def override_tag(
16
register: django.template.Library,
17
name: str,
18
- default_html: typing.Optional[typing.Any] = UNSPECIFIED,
+ default_html: typing.Optional[typing.Any] = None,
19
):
20
"""
21
An utility that helps you override original tags for use in your pattern library.
@@ -95,14 +95,14 @@ def node_render(context):
95
Warning,
96
)
97
else:
98
- raise TypeError(
+ warnings.warn(
99
'default_html argument to override_tag must be a string (line %s in "%s")'
100
% (trace.lineno, trace.filename)
101
102
103
# Render provided default;
104
# if no stub data supplied.
105
- return default_html
+ return default_html or ""
106
107
logger.warning(
108
'No default or stub data defined for the "%s" tag in the "%s" template',
0 commit comments