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

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

View file

@ -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)

View file

@ -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):