poli_planning/polyclinic_scheduling/apps/schedule/admin.py

17 lines
436 B
Python

from django.contrib import admin
from .models import Schedule
# Register your models here.
@admin.register(Schedule)
class ScheduleAdmin(admin.ModelAdmin):
list_display = ('name', 'employee', 'email', 'created_at', 'status','done')
ordering = ('-created_at', 'name',)
search_fields = ('name', 'email')
list_filter = ('status',)
def done(self,obj):
return obj.done
done.boolean = True