MCPcopy
hub / github.com/django/django / get_context

Method get_context

django/contrib/admin/widgets.py:109–115  ·  view source on GitHub ↗
(self, name, value, attrs)

Source from the content-addressed store, hash-verified

107 forms.MultiWidget.__init__(self, widgets, attrs)
108
109 def get_context(self, name, value, attrs):
110 context = super().get_context(name, value, attrs)
111 context["date_label"] = _("Date:")
112 context["time_label"] = _("Time:")
113 for widget in context["widget"]["subwidgets"]:
114 widget["attrs"]["aria-describedby"] = f"id_{name}_timezone_warning_helptext"
115 return context
116
117 def id_for_label(self, id_):
118 return id_

Callers 5

get_contextMethod · 0.45
get_contextMethod · 0.45
get_contextMethod · 0.45
get_contextMethod · 0.45
get_contextMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected