from django.contrib import admin
from .models import Profile, Contact


@admin.register(Profile)
class ProfileAdmin(admin.ModelAdmin):
    list_display = ("id", "users", "name", "created_by")
    search_fields = ("name", "users__username", "users__email")
    list_filter = ("created_by",)
    ordering = ("-created_by",)


@admin.register(Contact)
class ContactAdmin(admin.ModelAdmin):
    list_display = ("id", "name", "phone", "email", "sub", "created_by")
    search_fields = ("name", "phone", "email", "sub")
    list_filter = ("created_by",)
    ordering = ("-created_by",)


