コード例 #1
0
 def test_app_inclusion_list_excluded(self):
     app_settings.EXPLORER_SCHEMA_INCLUDE_APPS = ['explorer', ]
     app_settings.EXPLORER_SCHEMA_EXCLUDE_APPS = ('explorer', )
     res = schema_info()
     app_settings.EXPLORER_SCHEMA_INCLUDE_APPS = None
     app_settings.EXPLORER_SCHEMA_EXCLUDE_APPS = ('',)
     tables = [a[1] for a in res]
     self.assertNotIn('explorer_query', tables)
コード例 #2
0
def schema(request):
    return render_to_response('explorer/schema.html', {'schema': schema_info()})
コード例 #3
0
ファイル: views.py プロジェクト: roojoom/django-sql-explorer
def schema(request):
    return render_to_response("explorer/schema.html", {"schema": schema_info()})
コード例 #4
0
 def test_schema_info_returns_valid_data(self):
     res = schema_info()
     tables = [a[1] for a in res]
     self.assertIn('explorer_query', tables)
コード例 #5
0
 def test_app_inclusion_list(self):
     app_settings.EXPLORER_SCHEMA_INCLUDE_APPS = []
     res = schema_info()
     app_settings.EXPLORER_SCHEMA_INCLUDE_APPS = None
     tables = [a[1] for a in res]
     self.assertNotIn('explorer_query', tables)
コード例 #6
0
 def test_schema_info_returns_valid_data(self):
     res = schema_info()
     tables = [a[1] for a in res]
     self.assertIn('explorer_query', tables)
コード例 #7
0
def schema(request):
    return render_to_response('explorer/schema.html', {'schema': schema_info()})
コード例 #8
0
 def test_app_exclusion_list(self):
     app_settings.EXPLORER_SCHEMA_EXCLUDE_APPS = ('explorer', )
     res = schema_info()
     app_settings.EXPLORER_SCHEMA_EXCLUDE_APPS = ('', )
     tables = [a[1] for a in res]
     self.assertNotIn('explorer_query', tables)
コード例 #9
0
 def test_app_exclusion_list(self):
     app_settings.EXPLORER_SCHEMA_EXCLUDE_APPS = ('brandfin',)
     res = schema_info()
     app_settings.EXPLORER_SCHEMA_EXCLUDE_APPS = ('',)
     tables = [a[1] for a in res]
     self.assertNotIn('explorer_query', tables)