MCPcopy
hub / github.com/django/django / render

Method render

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

Source from the content-addressed store, hash-verified

89 return f"{type(self).__qualname__}({self._path!r})"
90
91 def render(self, *, attrs=None):
92 if (
93 attrs
94 and self.attributes
95 and (conflicts := attrs.keys() & self.attributes.keys())
96 ):
97 conflicts = ", ".join(sorted(conflicts))
98 raise ValueError(
99 f"{self.__class__.__qualname__} has conflicting attributes: "
100 f"{conflicts}"
101 )
102 return format_html(
103 self.element_template,
104 path=self.path,
105 attributes=flatatt({**(attrs or {}), **self.attributes}),
106 )
107
108 @property
109 def path(self):

Callers 3

__str__Method · 0.95

Calls 4

format_htmlFunction · 0.90
flatattFunction · 0.90
keysMethod · 0.45
joinMethod · 0.45