from django.contrib import admin
from .models import Contact


class ContactFormAdmin(admin.ModelAdmin):
    """
    Change Admin Panel's display name for contact model,
    set readonly fields for field visibility
    """
    readonly_fields = ('user', 'sent_on',)

    class Meta:
        fields = ('user', 'name', 'message', 'subject', 'message', 'sent_on')
        verbose_name = 'Contact Form'
        verbose_name_plural = 'Contact Forms'


admin.site.register(Contact, ContactFormAdmin)

0d6e09c285f8485b37c9f5a88b2eb3e3ce5632e9
<mask token>


class ContactFormAdmin(admin.ModelAdmin):
    <mask token>
    <mask token>


    class Meta:
        fields = 'user', 'name', 'message', 'subject', 'message', 'sent_on'
        verbose_name = 'Contact Form'
        verbose_name_plural = 'Contact Forms'


<mask token>

<mask token>


class ContactFormAdmin(admin.ModelAdmin):
    """
    Change Admin Panel's display name for contact model,
    set readonly fields for field visibility
    """
    readonly_fields = 'user', 'sent_on'


    class Meta:
        fields = 'user', 'name', 'message', 'subject', 'message', 'sent_on'
        verbose_name = 'Contact Form'
        verbose_name_plural = 'Contact Forms'


<mask token>

<mask token>


class ContactFormAdmin(admin.ModelAdmin):
    """
    Change Admin Panel's display name for contact model,
    set readonly fields for field visibility
    """
    readonly_fields = 'user', 'sent_on'


    class Meta:
        fields = 'user', 'name', 'message', 'subject', 'message', 'sent_on'
        verbose_name = 'Contact Form'
        verbose_name_plural = 'Contact Forms'


admin.site.register(Contact, ContactFormAdmin)

from django.contrib import admin
from .models import Contact


class ContactFormAdmin(admin.ModelAdmin):
    """
    Change Admin Panel's display name for contact model,
    set readonly fields for field visibility
    """
    readonly_fields = 'user', 'sent_on'


    class Meta:
        fields = 'user', 'name', 'message', 'subject', 'message', 'sent_on'
        verbose_name = 'Contact Form'
        verbose_name_plural = 'Contact Forms'


admin.site.register(Contact, ContactFormAdmin)

from django.contrib import admin
from .models import Contact


class ContactFormAdmin(admin.ModelAdmin):
    """
    Change Admin Panel's display name for contact model,
    set readonly fields for field visibility
    """
    readonly_fields = ('user', 'sent_on',)

    class Meta:
        fields = ('user', 'name', 'message', 'subject', 'message', 'sent_on')
        verbose_name = 'Contact Form'
        verbose_name_plural = 'Contact Forms'


admin.site.register(Contact, ContactFormAdmin)
