From 7aa473712fcdd52f8198a2a29b32535213b24cd6 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Tue, 20 Oct 2020 08:32:00 +1100 Subject: [PATCH] Remove unused setting page --- InvenTree/InvenTree/urls.py | 1 - InvenTree/common/apps.py | 3 ++ .../templates/InvenTree/settings/other.html | 44 ------------------- .../templates/InvenTree/settings/tabs.html | 5 --- 4 files changed, 3 insertions(+), 50 deletions(-) delete mode 100644 InvenTree/templates/InvenTree/settings/other.html diff --git a/InvenTree/InvenTree/urls.py b/InvenTree/InvenTree/urls.py index bc0316cca0..0b4292cbd9 100644 --- a/InvenTree/InvenTree/urls.py +++ b/InvenTree/InvenTree/urls.py @@ -77,7 +77,6 @@ settings_urls = [ url(r'^build/?', SettingsView.as_view(template_name='InvenTree/settings/build.html'), name='settings-build'), url(r'^purchase-order/?', SettingsView.as_view(template_name='InvenTree/settings/po.html'), name='settings-po'), url(r'^sales-order/?', SettingsView.as_view(template_name='InvenTree/settings/so.html'), name='settings-so'), - url(r'^other/?', SettingsView.as_view(template_name='InvenTree/settings/other.html'), name='settings-other'), # Catch any other urls url(r'^.*$', SettingsView.as_view(template_name='InvenTree/settings/user.html'), name='settings'), diff --git a/InvenTree/common/apps.py b/InvenTree/common/apps.py index 7106c1b746..afdf845f15 100644 --- a/InvenTree/common/apps.py +++ b/InvenTree/common/apps.py @@ -39,6 +39,9 @@ class CommonConfig(AppConfig): instance = InvenTreeSetting.objects.get(key='InstanceName') instance_name = instance.value + # Delete the legacy key + instance.delete() + # Create new value InvenTreeSetting.objects.create( key='INVENTREE_INSTANCE', diff --git a/InvenTree/templates/InvenTree/settings/other.html b/InvenTree/templates/InvenTree/settings/other.html deleted file mode 100644 index c518074fd0..0000000000 --- a/InvenTree/templates/InvenTree/settings/other.html +++ /dev/null @@ -1,44 +0,0 @@ -{% extends "InvenTree/settings/settings.html" %} - -{% load i18n %} - -{% block tabs %} -{% include "InvenTree/settings/tabs.html" with tab='other' %} -{% endblock %} - - -{% block subtitle %} -{% trans "Other Settings" %} -{% endblock %} - -{% block settings %} - -

InvenTree Settings

- - - - - - - - - - - {% for setting in settings %} - - - - - - {% endfor %} - -
SettingValueDescription
{{ setting.key }}{{ setting.value }}{{ setting.description }}
- -{% endblock %} - -{% block js_ready %} -{{ block.super }} - - $("#other-table").bootstrapTable(); - -{% endblock %} \ No newline at end of file diff --git a/InvenTree/templates/InvenTree/settings/tabs.html b/InvenTree/templates/InvenTree/settings/tabs.html index 67207fde52..ee402feb4f 100644 --- a/InvenTree/templates/InvenTree/settings/tabs.html +++ b/InvenTree/templates/InvenTree/settings/tabs.html @@ -29,9 +29,4 @@
  • {% trans "Sales Orders" %}
  • - {% if user.is_staff %} - - {% trans "Other" %} - - {% endif %} \ No newline at end of file