from django.contrib import admin
from .models import Project, Client

@admin.register(Client)
class ClientAdmin(admin.ModelAdmin):
    list_display = ('name', 'email', 'phone')
    search_fields = ('name',)

@admin.register(Project)
class ProjectAdmin(admin.ModelAdmin):
    list_display = ('name', 'client', 'start_date', 'end_date', 'status')
    list_filter = ('status', 'client')
    search_fields = ('name', 'client__name')
    autocomplete_fields = ('client',)