MCPcopy Create free account
hub / github.com/django/django / get_context

Method get_context

django/forms/widgets.py:807–812  ·  view source on GitHub ↗
(self, name, value, attrs)

Source from the content-addressed store, hash-verified

805 }
806
807 def get_context(self, name, value, attrs):
808 context = super().get_context(name, value, attrs)
809 context["widget"]["optgroups"] = self.optgroups(
810 name, context["widget"]["value"], attrs
811 )
812 return context
813
814 def id_for_label(self, id_, index="0"):
815 """

Callers

nothing calls this directly

Calls 2

optgroupsMethod · 0.95
get_contextMethod · 0.45

Tested by

no test coverage detected