summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrédéric Péters <fpeters@entrouvert.com>2019-05-23 14:21:17 (GMT)
committerFrédéric Péters <fpeters@entrouvert.com>2019-05-27 12:32:35 (GMT)
commitb1ba798e340e09bdc871b2a4bffe15930c724c92 (patch)
tree40ad3d894407b090fcba8815a2285b16990d5c9f
parent496bdb525f67bf87abe78f31178810e0d8e91d75 (diff)
downloadcombo-b1ba798e340e09bdc871b2a4bffe15930c724c92.zip
combo-b1ba798e340e09bdc871b2a4bffe15930c724c92.tar.gz
combo-b1ba798e340e09bdc871b2a4bffe15930c724c92.tar.bz2
dashboard: include dashboard add url in autotile response (#33380)
-rw-r--r--combo/apps/dashboard/views.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/combo/apps/dashboard/views.py b/combo/apps/dashboard/views.py
index b5d8c2e..d0cc107 100644
--- a/combo/apps/dashboard/views.py
+++ b/combo/apps/dashboard/views.py
@@ -125,7 +125,11 @@ def dashboard_auto_tile(request, *args, **kwargs):
# dashboard, or to be used as reference in another page, etc.
cell.save()
- return render_cell(request, cell=cell)
+ response = render_cell(request, cell=cell)
+ response['x-add-to-dashboard-url'] = reverse(
+ 'combo-dashboard-add-tile',
+ kwargs={'cell_reference': cell.get_reference()})
+ return response
def dashboard_reorder_tiles(request, *args, **kwargs):