Skip to content

Commit

Permalink
#228 search_form_query_rel_fields
Browse files Browse the repository at this point in the history
  • Loading branch information
dpgaspar committed Sep 25, 2015
1 parent 49157fa commit 94c5791
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 1 addition & 0 deletions examples/quickhowto2/app/views.py
Expand Up @@ -63,6 +63,7 @@ class ContactModelView2(ModelView):
datamodel = SQLAInterface(Contact)
list_columns = ['name', 'personal_celphone', 'birthday', 'contact_group.name']
add_form_query_rel_fields = {'gender':[['name',FilterStartsWith,'F']]}
search_form_query_rel_fields = {'gender':[['name',FilterStartsWith,'F']]}
list_template = 'mylist.html'
list_widget = MyListWidgetOverride
extra_args = {'widget_arg':'WIDGET'}
Expand Down
4 changes: 1 addition & 3 deletions flask_appbuilder/baseviews.py
Expand Up @@ -337,8 +337,6 @@ class ContactModelView(ModelView):
"""



label_columns = None
"""
Dictionary of labels for your columns, override this if you want diferent pretify labels
Expand Down Expand Up @@ -430,7 +428,7 @@ def _init_forms(self):
self.search_form = conv.create_form(self.label_columns,
self.search_columns,
extra_fields=self.search_form_extra_fields,
self.search_form_query_rel_fields)
filter_rel_fields=self.search_form_query_rel_fields)

def _get_search_widget(self, form=None, exclude_cols=None, widgets=None):
exclude_cols = exclude_cols or []
Expand Down

0 comments on commit 94c5791

Please sign in to comment.