Skip to content

Commit

Permalink
Parent class name added to field label in filters field forms.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kuba Janoszek committed Dec 29, 2011
1 parent c57626d commit 13cb932
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions qualitio/filter/fieldfilters.py
Expand Up @@ -36,6 +36,10 @@ def form_class_attrs(self):
if getattr(self.form_class, 'auto_query_field', False): if getattr(self.form_class, 'auto_query_field', False):
attrs['q'] = self.field.formfield(required=False) attrs['q'] = self.field.formfield(required=False)


# HACK: strict qualitio feature
if self.field.name == 'parent':
attrs['field_name_label'] = "%s (parent)" % self.field.rel.to.__name__

return attrs return attrs


def create_form_class(self): def create_form_class(self):
Expand Down

0 comments on commit 13cb932

Please sign in to comment.