예제 #1
0
    def __init__(self, attrs=None, extraskwargs=True):
        if extraskwargs:

            attrs = update_kwargs(attrs, self.__class__.__name__, base_class='wysiwyg form-control')
        attrs['data-option-image']=reverse_lazy('tinymce_upload_image')
        attrs['data-option-video']=reverse_lazy('tinymce_upload_video')
        super().__init__(attrs)
예제 #2
0
 def __init__(self, attrs=None, choices=(), extraskwargs=True):
     if extraskwargs:
         attrs = update_kwargs(attrs,
                               self.__class__.__name__,
                               base_class='form-control ')
     if 'add_url' not in attrs:
         raise ValueError(
             'TreeSelectMultipleWithAdd requires add_url in attrs')
     super().__init__(attrs, choices=choices, extraskwargs=False)
예제 #3
0
    def __init__(self, attrs=None, extraskwargs=True):
        if extraskwargs:

            attrs = update_kwargs(attrs,
                                  self.__class__.__name__,
                                  base_class='froala-editor form-control')
        attrs['data-option-image'] = reverse_lazy('upload_image')
        attrs['data-option-video'] = reverse_lazy('upload_video')
        attrs['data-option-file'] = reverse_lazy('upload_file')
        super().__init__(attrs)
예제 #4
0
 def __init__(self, attrs=None, extraskwargs=True):
     if extraskwargs:
         attrs = update_kwargs(
             attrs,
             self.__class__.__name__,
             base_class='djgentelella-file-input form-control')
     if 'data-href' not in attrs:
         attrs.update({'data-href': reverse_lazy('upload_file_view')})
     if 'data-done' not in attrs:
         attrs['data-done'] = reverse_lazy('upload_file_done')
     super().__init__(attrs)
예제 #5
0
 def __init__(self, attrs=None, choices=(), extraskwargs=True):
     if extraskwargs:
         attrs = update_kwargs(attrs, 'AutocompleteSelectMultiple',  base_class='form-control ')
     if self.baseurl is None:
         raise ValueError('Autocomplete requires baseurl to work')
     else:
         self.baseurl = self.baseurl
     attrsn = {
         'data-start_empty': 'false'
     }
     attrsn.update(attrs)
     attrsn.update(self.extra_attrs)
     super(AutocompleteSelectMultipleBase, self).__init__(attrsn, choices=choices, extraskwargs=False)
예제 #6
0
 def __init__(self, attrs=None, choices=(), extraskwargs=True):
     if extraskwargs:
         attrs = update_kwargs(attrs,
                               self.__class__.__name__,
                               base_class='form-control ')
     super().__init__(attrs, choices=choices, extraskwargs=False)