MCPcopy
hub / github.com/django/django / render_css

Method render_css

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

Source from the content-addressed store, hash-verified

187 ]
188
189 def render_css(self, *, attrs=None):
190 # To keep rendering order consistent, we can't just iterate over
191 # items(). We need to sort the keys, and iterate over the sorted list.
192 media = sorted(self._css)
193 return chain.from_iterable(
194 [
195 (
196 path.render(attrs=attrs)
197 if isinstance(path, MediaAsset)
198 else (
199 path.__html__()
200 if hasattr(path, "__html__")
201 else Stylesheet(path, media=medium).render(attrs=attrs)
202 )
203 )
204 for path in self._css[medium]
205 ]
206 for medium in media
207 )
208
209 def absolute_path(self, path):
210 """

Callers

nothing calls this directly

Calls 3

StylesheetClass · 0.70
renderMethod · 0.45
__html__Method · 0.45

Tested by

no test coverage detected