Exemple #1
0
 def __init__(self, key_attrs={}, val_attrs={}, *args, **kwargs):
     """
     :param key_attrs: HTML attributes applied to the 1st input box
     :param val_attrs: HTML attributes applied to the 2nd input box
     """
     self.key_attrs = key_attrs
     self.val_attrs = val_attrs
     Widget.__init__(self, *args, **kwargs)
Exemple #2
0
 def __init__(self, key_attrs={}, val_attrs={}, *args, **kwargs):
     """
     :param key_attrs: HTML attributes applied to the 1st input box
     :param val_attrs: HTML attributes applied to the 2nd input box
     """
     self.key_attrs = key_attrs
     self.val_attrs = val_attrs
     Widget.__init__(self, *args, **kwargs)
Exemple #3
0
    def __init__(self, *args, **kwargs):
        """A widget that ...
    """
        self.key_attrs = {}
        self.val_attrs = {}
        if "key_attrs" in kwargs:
            self.key_attrs = kwargs.pop("key_attrs")
        if "val_attrs" in kwargs:
            self.val_attrs = kwargs.pop("val_attrs")
        Widget.__init__(self, *args, **kwargs)

        def render(self, name, value, attrs=None):
            """Renders this widget into an html string
Exemple #4
0
    def __init__(self, *args, **kwargs):
        """
        kwargs:
        key_attrs -- html attributes applied to the 1st input box pairs
        val_attrs -- html attributes applied to the 2nd input box pairs

        """
        self.key_attrs = {}
        self.val_attrs = {}
        if "key_attrs" in kwargs:
            self.key_attrs = kwargs.pop("key_attrs")
        if "val_attrs" in kwargs:
            self.val_attrs = kwargs.pop("val_attrs")
        Widget.__init__(self, *args, **kwargs)
Exemple #5
0
    def __init__(self,
                 attrs=None,
                 newline='<br/>\n',
                 sep='__',
                 col1='col-md-3',
                 col2='col-md-9',
                 debug=False):
        self.newline = newline
        self.separator = sep
        self.debug = debug
        self.css_column1 = col1
        self.css_column2 = col2

        Widget.__init__(self, attrs)
Exemple #6
0
    def __init__(self, *args, **kwargs):
        """A widget that displays JSON Key Value Pairs
        as a list of text input box pairs

        kwargs:
        key_attrs -- html attributes applied to the 1st input box pairs
        val_attrs -- html attributes applied to the 2nd input box pairs

        """
        self.key_attrs = {}
        self.val_attrs = {}
        if "key_attrs" in kwargs:
            self.key_attrs = kwargs.pop("key_attrs")
        if "val_attrs" in kwargs:
            self.val_attrs = kwargs.pop("val_attrs")
        Widget.__init__(self, *args, **kwargs)
Exemple #7
0
    def __init__(self, *args, **kwargs):
        """A widget that displays JSON Key Value Pairs
        as a list of text input box pairs

        kwargs:
        key_attrs -- html attributes applied to the 1st input box pairs
        val_attrs -- html attributes applied to the 2nd input box pairs

        """
        self.key_attrs = {}
        self.val_attrs = {}
        if "key_attrs" in kwargs:
            self.key_attrs = kwargs.pop("key_attrs")
        if "val_attrs" in kwargs:
            self.val_attrs = kwargs.pop("val_attrs")
        Widget.__init__(self, *args, **kwargs)
Exemple #8
0
 def __init__(self, attrs=None, newline='<br/>\n', sep='__', debug=False):
     self.newline = newline
     self.separator = sep
     self.debug = debug
     Widget.__init__(self, attrs)
 def __init__(self, attrs=None, newline='<br/>\n', sep='__', debug=False):
     self.newline = newline
     self.separator = sep
     self.debug = debug
     Widget.__init__(self, attrs)
Exemple #10
0
 def __init__(self, *args, **kwargs):
     if "checked" in kwargs:
         self.checked = kwargs.pop("checked")
     Widget.__init__(self, *args, **kwargs)
Exemple #11
0
 def __init__(self, *args, **kwargs):
     if "checked" in kwargs:
         self.checked = kwargs.pop("checked")
     Widget.__init__(self, *args, **kwargs)