From 560d419aa65e1ae43d0831c27a25867546eb03eb Mon Sep 17 00:00:00 2001
From: PaulMagos
Date: Sat, 11 Nov 2023 17:49:09 +0100
Subject: [PATCH] Updated
---
.gitignore | 3 ++-
smartreport_app/admin.py | 3 ++-
smartreport_app/models.py | 6 ------
3 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/.gitignore b/.gitignore
index cc53e6f..43ae3e5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -162,4 +162,5 @@ cython_debug/
node_modules
# Static files
-staticfiles_build
\ No newline at end of file
+staticfiles_build
+.vercel
diff --git a/smartreport_app/admin.py b/smartreport_app/admin.py
index bf7af19..8b2ddc6 100644
--- a/smartreport_app/admin.py
+++ b/smartreport_app/admin.py
@@ -60,5 +60,6 @@ def get_kpi_name(self, obj):
@admin.register(DashboardLayout)
class DashboardLayoutAdmin(admin.ModelAdmin):
- list_display = ('user_type', 'layout') # Fields to display in the list view
+ list_display = ('id', 'user_type', 'layout') # Fields to display in the list view
+ list_filter = ("user_type", )
search_fields = ('user_type',) # Fields to enable searching in the admin interface
diff --git a/smartreport_app/models.py b/smartreport_app/models.py
index 8aa01ac..0e913c3 100644
--- a/smartreport_app/models.py
+++ b/smartreport_app/models.py
@@ -114,9 +114,6 @@ class Alarm(models.Model):
min_value = models.FloatField()
max_value = models.FloatField()
- def __str__(self):
- return self.name
-
class DashboardLayout(models.Model):
user_type = models.CharField(
@@ -126,9 +123,6 @@ class DashboardLayout(models.Model):
layout = models.JSONField()
- def __str__(self):
- return self.name
-
class ArchivedReport(models.Model):
created = models.DateTimeField(auto_now_add=True)