Skip to main content

URLInput

This class represents a URL input widget for HTML forms, specifically designed to handle and validate web addresses. It inherits from the base input class and utilizes a specialized template for rendering URL-specific attributes and behaviors.

Attributes

AttributeTypeDescription
input_typestring = urlSpecifies the HTML input type attribute used when rendering the widget, which defaults to 'url' to trigger browser-level URL validation.
template_namestring = django/forms/widgets/url.htmlThe file path to the Django HTML template used for rendering the URL input widget.

Constructor

Signature

def URLInput() - > null

Signature

def URLInput(
attrs: dict = null
) - > null

Parameters

NameTypeDescription
attrsdict = nullA dictionary containing HTML attributes to be rendered on the input element.