from django.contrib import admin
from django.contrib.auth.admin import UserAdmin as BaseUserAdmin
from message.models import Message, User


@admin.register(Message)
class MessageAdmin(admin.ModelAdmin):
    readonly_fields = ["id"]
    list_display = ["id", "sender", "receiver", "subject", "creation_date", "seen"]


@admin.register(User)
class UserAdmin(BaseUserAdmin):
    readonly_fields = ["date_joined", "last_login"]
    list_filter = ["username", "email"]


aaf90a3426c5a41f61f7855257b53f4433a47e63
<mask token>


@admin.register(User)
class UserAdmin(BaseUserAdmin):
    readonly_fields = ['date_joined', 'last_login']
    list_filter = ['username', 'email']

<mask token>


@admin.register(Message)
class MessageAdmin(admin.ModelAdmin):
    <mask token>
    <mask token>


@admin.register(User)
class UserAdmin(BaseUserAdmin):
    readonly_fields = ['date_joined', 'last_login']
    list_filter = ['username', 'email']

<mask token>


@admin.register(Message)
class MessageAdmin(admin.ModelAdmin):
    readonly_fields = ['id']
    list_display = ['id', 'sender', 'receiver', 'subject', 'creation_date',
        'seen']


@admin.register(User)
class UserAdmin(BaseUserAdmin):
    readonly_fields = ['date_joined', 'last_login']
    list_filter = ['username', 'email']

from django.contrib import admin
from django.contrib.auth.admin import UserAdmin as BaseUserAdmin
from message.models import Message, User


@admin.register(Message)
class MessageAdmin(admin.ModelAdmin):
    readonly_fields = ['id']
    list_display = ['id', 'sender', 'receiver', 'subject', 'creation_date',
        'seen']


@admin.register(User)
class UserAdmin(BaseUserAdmin):
    readonly_fields = ['date_joined', 'last_login']
    list_filter = ['username', 'email']

from django.contrib import admin
from django.contrib.auth.admin import UserAdmin as BaseUserAdmin
from message.models import Message, User


@admin.register(Message)
class MessageAdmin(admin.ModelAdmin):
    readonly_fields = ["id"]
    list_display = ["id", "sender", "receiver", "subject", "creation_date", "seen"]


@admin.register(User)
class UserAdmin(BaseUserAdmin):
    readonly_fields = ["date_joined", "last_login"]
    list_filter = ["username", "email"]

