MCPcopy
hub / github.com/django/django / render_js

Method render_js

django/forms/widgets.py:175–187  ·  view source on GitHub ↗
(self, *, attrs=None)

Source from the content-addressed store, hash-verified

173 )
174
175 def render_js(self, *, attrs=None):
176 return [
177 (
178 path.render(attrs=attrs)
179 if isinstance(path, MediaAsset)
180 else (
181 path.__html__()
182 if hasattr(path, "__html__")
183 else Script(path).render(attrs=attrs)
184 )
185 )
186 for path in self._js
187 ]
188
189 def render_css(self, *, attrs=None):
190 # To keep rendering order consistent, we can't just iterate over

Callers

nothing calls this directly

Calls 3

ScriptClass · 0.85
renderMethod · 0.45
__html__Method · 0.45

Tested by

no test coverage detected