diff --git a/src/sensor/templatetags/sensor_tags.py b/src/sensor/templatetags/sensor_tags.py index 3ebdbd1e..9c28caa4 100644 --- a/src/sensor/templatetags/sensor_tags.py +++ b/src/sensor/templatetags/sensor_tags.py @@ -1,10 +1,9 @@ from django import template - -from sensor.settings import VERSION_STRING +from django.conf import settings register = template.Library() @register.simple_tag def sensor_version_string(): - return VERSION_STRING + return settings.VERSION_STRING diff --git a/src/status/migrations/0003_auto_20211217_2229.py b/src/status/migrations/0003_auto_20211217_2229.py index 45c3648c..f8b9b164 100644 --- a/src/status/migrations/0003_auto_20211217_2229.py +++ b/src/status/migrations/0003_auto_20211217_2229.py @@ -2,13 +2,12 @@ import json +from django.conf import settings from django.db import migrations -from sensor.settings import SENSOR_DEFINITION_FILE - def load_location(apps, schema_editor): - with open(SENSOR_DEFINITION_FILE) as f: + with open(settings.SENSOR_DEFINITION_FILE) as f: sensor_def = json.load(f) if "location" in sensor_def: location = sensor_def["location"] diff --git a/src/tasks/tests/test_archive_download.py b/src/tasks/tests/test_archive_download.py index 08899e49..f031879b 100644 --- a/src/tasks/tests/test_archive_download.py +++ b/src/tasks/tests/test_archive_download.py @@ -1,9 +1,9 @@ import tempfile import sigmf.sigmffile +from django.conf import settings from rest_framework import status -import sensor.settings from test_utils.task_test_utils import ( HTTPS_KWARG, reverse_archive, @@ -18,7 +18,7 @@ def test_single_acquisition_archive_download(admin_client, test_scheduler): task_id = 1 url = reverse_archive(entry_name, task_id) disposition = 'attachment; filename="{}_test_acq_1.sigmf"' - disposition = disposition.format(sensor.settings.FQDN) + disposition = disposition.format(settings.FQDN) response = admin_client.get(url, **HTTPS_KWARG) assert response.status_code == status.HTTP_200_OK @@ -44,7 +44,7 @@ def test_multirec_acquisition_archive_download(admin_client, test_scheduler): task_id = 1 url = reverse_archive(entry_name, task_id) disposition = 'attachment; filename="{}_test_multirec_acq_1.sigmf"' - disposition = disposition.format(sensor.settings.FQDN) + disposition = disposition.format(settings.FQDN) response = admin_client.get(url, **HTTPS_KWARG) assert response.status_code == status.HTTP_200_OK @@ -64,7 +64,7 @@ def test_all_acquisitions_archive_download(admin_client, test_scheduler, tmpdir) entry_name = simulate_frequency_fft_acquisitions(admin_client, n=3) url = reverse_archive_all(entry_name) disposition = 'attachment; filename="{}_test_multiple_acq.sigmf"' - disposition = disposition.format(sensor.settings.FQDN) + disposition = disposition.format(settings.FQDN) response = admin_client.get(url, **HTTPS_KWARG) assert response.status_code == status.HTTP_200_OK