update admin interface
All checks were successful
/ test (push) Successful in 51s
/ deploy (push) Successful in 4m48s

This commit is contained in:
j3d1 2024-11-23 14:40:13 +01:00
parent d5eadbe4b1
commit 7961948f5d
2 changed files with 16 additions and 2 deletions

View file

@ -1,6 +1,6 @@
from django.contrib import admin 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): class ItemAdmin(admin.ModelAdmin):
@ -22,3 +22,17 @@ class EventAdmin(admin.ModelAdmin):
admin.site.register(Event, EventAdmin) 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)

View file

@ -92,7 +92,7 @@ class Comment(models.Model):
timestamp = models.DateTimeField(auto_now_add=True) timestamp = models.DateTimeField(auto_now_add=True)
def __str__(self): def __str__(self):
return str(self.issue_thread) + ' comment #' + str(self.id) return str(self.item) + ' comment #' + str(self.id)
class Event(models.Model): class Event(models.Model):