diff --git a/superset/assets/javascripts/dashboard/Dashboard.jsx b/superset/assets/javascripts/dashboard/Dashboard.jsx
index 73348a46212d2..dc02a7ef14f44 100644
--- a/superset/assets/javascripts/dashboard/Dashboard.jsx
+++ b/superset/assets/javascripts/dashboard/Dashboard.jsx
@@ -336,6 +336,7 @@ export function dashboardContainer(dashboard) {
$(document).ready(() => {
// Getting bootstrapped data from the DOM
+ utils.initJQueryAjaxCSRF();
const dashboardData = $('.dashboard').data('dashboard');
const contextData = $('.dashboard').data('context');
diff --git a/superset/templates/superset/basic.html b/superset/templates/superset/basic.html
index d07fa665feaa3..a2e9200c647af 100644
--- a/superset/templates/superset/basic.html
+++ b/superset/templates/superset/basic.html
@@ -38,7 +38,12 @@
- {{ csrf_token() if csrf_token else None }}
+
{% endblock %}
diff --git a/superset/templates/superset/dashboard.html b/superset/templates/superset/dashboard.html
index f899d6fa0a24b..ae203ba3b1952 100644
--- a/superset/templates/superset/dashboard.html
+++ b/superset/templates/superset/dashboard.html
@@ -22,4 +22,10 @@
+
{% endblock %}
diff --git a/superset/views/core.py b/superset/views/core.py
index 291cf5fb06aa8..1d919705ce604 100755
--- a/superset/views/core.py
+++ b/superset/views/core.py
@@ -2198,11 +2198,8 @@ def sqllab(self):
d = {
'defaultDbId': config.get('SQLLAB_DEFAULT_DBID'),
}
- from flask_wtf import FlaskForm
- ff = FlaskForm()
return self.render_template(
'superset/sqllab.html',
- csrf_token=ff.csrf_token,
bootstrap_data=json.dumps(d, default=utils.json_iso_dttm_ser)
)
appbuilder.add_view_no_menu(Superset)