Skip to content

Commit

Permalink
removes MessageProxy model from admin.py for simplicity
Browse files Browse the repository at this point in the history
  • Loading branch information
filipeximenes committed Aug 13, 2024
1 parent e580c65 commit 92c7652
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions django_ai_assistant/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,8 @@
from django_ai_assistant.models import Message, Thread


class MessageProxy(Message):
class Meta:
proxy = True
verbose_name = Message._meta.verbose_name
verbose_name_plural = Message._meta.verbose_name_plural

def __str__(self) -> str:
return self.__repr__()


class MessageInline(admin.TabularInline):
model = MessageProxy
model = Message
extra = 0
fields = ("pk", "message_type", "content", "created_at")
readonly_fields = fields
Expand Down

0 comments on commit 92c7652

Please sign in to comment.