Exemplo n.º 1
0
 def __init__(self, formset, allow_blank=False, **kwargs):
     self.fields = []
     self.css_class = kwargs.pop('css_class', '')
     self.css_id = "%s-group" % formset.prefix
     self.template = formset.style.template
     if allow_blank and len(formset) == 0:
         self.template = 'xadmin/edit_inline/blank.html'
     self.formset = formset
     self.model = formset.model
     self.opts = formset.model._meta
     self.flat_attrs = flatatt(kwargs)
     self.extra_attrs = formset.style.get_attrs()
Exemplo n.º 2
0
 def __init__(self, formset, allow_blank=False, **kwargs):
     self.fields = []
     self.css_class = kwargs.pop('css_class', '')
     self.css_id = "%s-group" % formset.prefix
     self.template = formset.style.template
     if allow_blank and len(formset) == 0:
         self.template = 'xadmin/edit_inline/blank.html'
     self.formset = formset
     self.model = formset.model
     self.opts = formset.model._meta
     self.flat_attrs = flatatt(kwargs)
     self.extra_attrs = formset.style.get_attrs()