diff --git a/server/django/sensordata/views.py b/server/django/sensordata/views.py index 02037582..a6e6d0a0 100644 --- a/server/django/sensordata/views.py +++ b/server/django/sensordata/views.py @@ -2,9 +2,8 @@ from rest_framework.response import Response from rest_framework import status from .serializers import LwM2MSerializer -from django.shortcuts import render, redirect +from django.shortcuts import render from django.contrib.auth.decorators import login_required -from django.contrib.auth import login from .models import Device, Resource, Event, DeviceOperation, Firmware, ResourceType import logging diff --git a/server/django/server/settings.py b/server/django/server/settings.py index a8a0bf39..253cb89f 100644 --- a/server/django/server/settings.py +++ b/server/django/server/settings.py @@ -11,7 +11,6 @@ """ from pathlib import Path -import os # Build paths inside the project like this: BASE_DIR / 'subdir'. BASE_DIR = Path(__file__).resolve().parent.parent @@ -161,10 +160,8 @@ STATIC_URL = '/static/' STATIC_ROOT = BASE_DIR / 'static_collect' -STATICFILES_DIRS = [ - BASE_DIR / 'staticfiles', -] -WHITENOISE_USE_FINDERS = True +STATICFILES_DIRS = [ BASE_DIR / 'staticfiles',] +WHITENOISE_USE_FINDERS = True # Default primary key field type # https://docs.djangoproject.com/en/5.0/ref/settings/#default-auto-field