From baac8c44a549f03804a9969240e43cfd47bb6f08 Mon Sep 17 00:00:00 2001 From: Maxime Beauchemin Date: Thu, 11 Feb 2016 13:23:46 -0800 Subject: [PATCH] Desperatly changing view name to avoid proxy odd bug --- panoramix/models.py | 4 ++-- panoramix/templates/panoramix/models/database/macros.html | 2 +- panoramix/views.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/panoramix/models.py b/panoramix/models.py index 93657f9c78..46da8e732b 100644 --- a/panoramix/models.py +++ b/panoramix/models.py @@ -304,7 +304,7 @@ class SqlaTable(Model, Queryable, AuditMixinNullable): 'Database', backref='tables', foreign_keys=[database_id]) offset = Column(Integer, default=0) - baselink = "tableview" + baselink = "tablemodelview" def __repr__(self): return self.table_name @@ -315,7 +315,7 @@ class SqlaTable(Model, Queryable, AuditMixinNullable): @property def url(self): - return '/tableview/edit/{}'.format(self.id) + return '/tablemodelview/edit/{}'.format(self.id) @property def link(self): diff --git a/panoramix/templates/panoramix/models/database/macros.html b/panoramix/templates/panoramix/models/database/macros.html index edcd4beac6..398355ee2b 100644 --- a/panoramix/templates/panoramix/models/database/macros.html +++ b/panoramix/templates/panoramix/models/database/macros.html @@ -18,7 +18,7 @@ $.each(data, function(i, d){ var id = 'tbl_' + d; div.append('' + d + '') - $('#' + id).click(function(){window.location = '/tableview/add';}) + $('#' + id).click(function(){window.location = '/tablemodelview/add';}) }); }).fail(function(error) { alert("ERROR: " + error.responseText); diff --git a/panoramix/views.py b/panoramix/views.py index 20b9e92a50..91d7bdb47d 100644 --- a/panoramix/views.py +++ b/panoramix/views.py @@ -147,7 +147,7 @@ appbuilder.add_view( category_icon='fa-database',) -class TableView(PanoramixModelView, DeleteMixin): +class TableModelView(PanoramixModelView, DeleteMixin): datamodel = SQLAInterface(models.SqlaTable) list_columns = [ 'table_link', 'database', 'sql_link', 'changed_by_', 'changed_on_'] @@ -176,7 +176,7 @@ class TableView(PanoramixModelView, DeleteMixin): self.post_add(table) appbuilder.add_view( - TableView, + TableModelView, "Tables", category="Sources", icon='fa-table',)