robosats/chat/admin.py

21 lines
566 B
Python
Raw Normal View History

2022-01-13 11:07:20 +00:00
from django.contrib import admin
2022-03-10 21:35:16 +00:00
from django_admin_relation_links import AdminChangeLinksMixin
from chat.models import ChatRoom
2022-01-13 11:07:20 +00:00
# Register your models here.
2022-03-10 21:35:16 +00:00
@admin.register(ChatRoom)
2022-03-11 14:33:07 +00:00
class ChatRoomAdmin(AdminChangeLinksMixin, admin.ModelAdmin):
2022-03-10 21:35:16 +00:00
list_display = (
"id",
"order_link",
"maker_link",
"taker_link",
"maker_connected",
"taker_connected",
"maker_connect_date",
"taker_connect_date",
"room_group_name",
)
2022-03-11 14:33:07 +00:00
change_links = ["order","maker","taker"]
search_fields = ["id"]