def __init__(self, *args, **kwargs):
        """
        The init method is overwritten to apply widget templates and CSS classes.
        """
        super().__init__(*args, **kwargs)

        for field_name in self.fields:
            self.apply_widget_options(field_name)
            self.apply_widget_template(field_name)
            self.apply_widget_css_class(field_name)
def __init__ ( self , * args , ** kwargs ) : super ( ) . __init__ ( * args , ** kwargs ) for field_name in self . fields : self . apply_widget_options ( field_name ) self . apply_widget_template ( field_name ) self . apply_widget_css_class ( field_name )
The init method is overwritten to apply widget templates and CSS classes.