Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make form_data dict a macro #2585

Merged
merged 1 commit into from
Apr 11, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion superset/connectors/druid/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,7 @@ def get_query_str( # noqa / druid
orderby=None,
extras=None, # noqa
select=None, # noqa
columns=None, phase=2, client=None):
columns=None, phase=2, client=None, form_data=None):
"""Runs a query against Druid and returns a dataframe.

This query interface is common to SqlAlchemy and Druid
Expand Down
4 changes: 3 additions & 1 deletion superset/connectors/sqla/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,8 @@ def get_sqla_query( # sqla
inner_to_dttm=None,
orderby=None,
extras=None,
columns=None):
columns=None,
form_data=None):
"""Querying any sqla table from this common interface"""

template_kwargs = {
Expand All @@ -355,6 +356,7 @@ def get_sqla_query( # sqla
'metrics': metrics,
'row_limit': row_limit,
'to_dttm': to_dttm,
'form_data': form_data,
}
template_processor = self.get_template_processor(**template_kwargs)

Expand Down
1 change: 1 addition & 0 deletions superset/jinja_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ def __init__(self, database=None, query=None, table=None, **kwargs):
'url_param': url_param,
'current_user_id': current_user_id,
'current_username': current_username,
'form_data': {},
}
self.context.update(kwargs)
self.context.update(BASE_CONTEXT)
Expand Down
1 change: 1 addition & 0 deletions superset/viz.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ def query_obj(self):
'timeseries_limit': limit,
'extras': extras,
'timeseries_limit_metric': timeseries_limit_metric,
'form_data': form_data,
}
return d

Expand Down