Skip to content

Commit

Permalink
feature(URLInput): added support for URL fields (#246)
Browse files Browse the repository at this point in the history
Co-authored-by: Andréa Autolitano <andrea.autolitano@gmail.com>
  • Loading branch information
andiaut and Andréa Autolitano committed May 1, 2021
1 parent 0ce9987 commit adc9906
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/bootstrap4/renderers.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
Select,
SelectDateWidget,
TextInput,
URLInput,
)
from django.utils.html import conditional_escape, escape, strip_tags
from django.utils.safestring import mark_safe
Expand Down Expand Up @@ -393,7 +394,7 @@ def make_input_group_addon(self, inner_class, outer_class, content):

@property
def is_input_group(self):
allowed_widget_types = (TextInput, PasswordInput, DateInput, NumberInput, Select, EmailInput)
allowed_widget_types = (TextInput, PasswordInput, DateInput, NumberInput, Select, EmailInput, URLInput)
return (self.addon_before or self.addon_after) and isinstance(self.widget, allowed_widget_types)

def make_input_group(self, html):
Expand Down

0 comments on commit adc9906

Please sign in to comment.