From d4ffa0228cf544b411a152c3c3f9801f48781e5f Mon Sep 17 00:00:00 2001 From: jedi Date: Sat, 23 Nov 2024 14:40:13 +0100 Subject: [PATCH] update admin interface --- core/inventory/admin.py | 16 +++++++++++++++- core/inventory/models.py | 2 +- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/core/inventory/admin.py b/core/inventory/admin.py index 2457b5b..24cd14a 100644 --- a/core/inventory/admin.py +++ b/core/inventory/admin.py @@ -1,6 +1,6 @@ from django.contrib import admin -from inventory.models import Item, Container, Event +from inventory.models import Item, Container, ItemPlacement, Comment, Event class ItemAdmin(admin.ModelAdmin): @@ -22,3 +22,17 @@ class EventAdmin(admin.ModelAdmin): admin.site.register(Event, EventAdmin) + + +class ItemPlacementAdmin(admin.ModelAdmin): + pass + + +admin.site.register(ItemPlacement, ItemPlacementAdmin) + + +class CommentAdmin(admin.ModelAdmin): + pass + + +admin.site.register(Comment, CommentAdmin) diff --git a/core/inventory/models.py b/core/inventory/models.py index fbbe0a9..10796e1 100644 --- a/core/inventory/models.py +++ b/core/inventory/models.py @@ -92,7 +92,7 @@ class Comment(models.Model): timestamp = models.DateTimeField(auto_now_add=True) def __str__(self): - return str(self.issue_thread) + ' comment #' + str(self.id) + return str(self.item) + ' comment #' + str(self.id) class Event(models.Model):