-
Notifications
You must be signed in to change notification settings - Fork 371
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
25543c3
commit bc2c1c7
Showing
18 changed files
with
297 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
from django.urls import path | ||
from explorer.assistant.views import (TableDescriptionListView, | ||
TableDescriptionCreateView, | ||
TableDescriptionUpdateView, | ||
TableDescriptionDeleteView, | ||
AssistantHelpView) | ||
|
||
assistant_urls = [ | ||
path("assistant/", AssistantHelpView.as_view(), name="assistant"), | ||
path("table-descriptions/", TableDescriptionListView.as_view(), name="table_description_list"), | ||
path("table-descriptions/new/", TableDescriptionCreateView.as_view(), name="table_description_create"), | ||
path("table-descriptions/<int:pk>/update/", TableDescriptionUpdateView.as_view(), name="table_description_update"), | ||
path("table-descriptions/<int:pk>/delete/", TableDescriptionDeleteView.as_view(), name="table_description_delete"), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Generated by Django 5.0.4 on 2024-08-19 14:48 | ||
|
||
import django.db.models.deletion | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('explorer', '0025_remove_query_connection_remove_querylog_connection_and_more'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='TableDescription', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('table_name', models.CharField(max_length=512)), | ||
('description', models.TextField()), | ||
('connection', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='explorer.databaseconnection')), | ||
], | ||
options={ | ||
'unique_together': {('connection', 'table_name')}, | ||
}, | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
explorer/templates/assistant/table_description_confirm_delete.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{% extends "explorer/base.html" %} | ||
|
||
{% block sql_explorer_content %} | ||
<div class="container mt-5"> | ||
<h1>Confirm Delete</h1> | ||
<p>Are you sure you want to delete the table description for "{{ object.table_name }}" in {{ object.connection.alias }}?</p> | ||
<form method="post"> | ||
{% csrf_token %} | ||
<button type="submit" class="btn btn-danger">Confirm Delete</button> | ||
<a href="{% url 'table_description_list' %}" class="btn btn-secondary">Cancel</a> | ||
</form> | ||
</div> | ||
{% endblock %} | ||
|
Oops, something went wrong.