Example #1
0
 def get_lookups(self, prefix='', models=None):
     models = models or []
     lookups = get_lookups(self.model, self.exclude_fields, prefix, models)
     for related_filter in self.related:
         rel_model = related_filter.model
         path = models_to_path([self.model, rel_model])
         lookups.extend(related_filter.get_lookups(prefix + path + '__', models + [rel_model]))
     return lookups
Example #2
0
 def get_prefix(self):
     if not self.path:
         return ''
     return models_to_path(self.path) + '__'
Example #3
0
 def get_prefix(self):
     if not self.path:
         return ''
     return models_to_path(self.path) + '__'
Example #4
0
 def get_forms(self, prefix=''):
     forms = [self.get_form(prefix)]
     for related_filter in self.related:
         path = models_to_path([self.model, related_filter.model])
         forms.extend(related_filter.get_forms(prefix + path + '__'))
     return forms