poli_planning/polyclinic_scheduling/apps/schedule/admin.py

16 lines
428 B
Python
Raw Normal View History

2020-05-13 15:54:40 +02:00
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', 'processed')
2020-05-18 12:19:15 +02:00
ordering = ('created_at', 'name',)
2020-05-13 15:54:40 +02:00
search_fields = ('name', 'email')
def processed(self,obj):
return len(obj.output_peregrine) > 0
processed.boolean = True