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

Method get_context

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

Source from the content-addressed store, hash-verified

855 option_inherits_attrs = False
856
857 def get_context(self, name, value, attrs):
858 context = super().get_context(name, value, attrs)
859 if self.allow_multiple_selected:
860 context["widget"]["attrs"]["multiple"] = True
861 return context
862
863 @staticmethod
864 def _choice_has_empty_value(choice):

Callers

nothing calls this directly

Calls 1

get_contextMethod · 0.45

Tested by

no test coverage detected