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
| Attribute | Type | Description |
|---|---|---|
| input_type | string = url | Specifies the HTML input type attribute used when rendering the widget, which defaults to 'url' to trigger browser-level URL validation. |
| template_name | string = django/forms/widgets/url.html | The 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
| Name | Type | Description |
|---|---|---|
| attrs | dict = null | A dictionary containing HTML attributes to be rendered on the input element. |