mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Fixed documentation of Widget.id_for_label() empty return value.
This commit is contained in:
@@ -301,8 +301,8 @@ class Widget(metaclass=MediaDefiningClass):
|
||||
|
||||
def id_for_label(self, id_):
|
||||
"""
|
||||
Return the HTML ID attribute of this Widget for use by a <label>,
|
||||
given the ID of the field. Return None if no ID is available.
|
||||
Return the HTML ID attribute of this Widget for use by a <label>, given
|
||||
the ID of the field. Return an empty string if no ID is available.
|
||||
|
||||
This hook is necessary because some widgets have multiple HTML
|
||||
elements and, thus, multiple IDs. In that case, this method should
|
||||
|
||||
Reference in New Issue
Block a user