|
@ -91,11 +91,11 @@ def sourceDetail(request, sourceId): |
|
|
|
|
|
|
|
|
@csrf_exempt |
|
|
@csrf_exempt |
|
|
def sourceTables(request, sourceId): |
|
|
def sourceTables(request, sourceId): |
|
|
|
|
|
json_data = [] |
|
|
try: |
|
|
try: |
|
|
tables = SourceDataTable.objects.get(database=sourceId) |
|
|
tables = SourceDataTable.objects.get(database=sourceId) |
|
|
tables = serializers.serialize('json', [tables]) |
|
|
tables = serializers.serialize('json', [tables]) |
|
|
tables = json.loads(tables) |
|
|
tables = json.loads(tables) |
|
|
json_data = [] |
|
|
|
|
|
for table in tables: |
|
|
for table in tables: |
|
|
json_data.append(table['fields']) |
|
|
json_data.append(table['fields']) |
|
|
|
|
|
|
|
@ -162,8 +162,11 @@ def sourceTableSave(request): |
|
|
def sourceLinkedTables(request, sourceId): |
|
|
def sourceLinkedTables(request, sourceId): |
|
|
try: |
|
|
try: |
|
|
tables = SourceDataTable.objects.get(database=sourceId) |
|
|
tables = SourceDataTable.objects.get(database=sourceId) |
|
|
|
|
|
print(tables) |
|
|
tables = serializers.serialize('json', [tables]) |
|
|
tables = serializers.serialize('json', [tables]) |
|
|
|
|
|
print(tables) |
|
|
tables = json.loads(tables) |
|
|
tables = json.loads(tables) |
|
|
|
|
|
print(tables) |
|
|
json_data = [] |
|
|
json_data = [] |
|
|
for table in tables: |
|
|
for table in tables: |
|
|
json_data.append(table['fields']) |
|
|
json_data.append(table['fields']) |
|
|