{# taken from https://github.com/django/django/blob/master/django/forms/widgets.py #}