poli_planning/polyclinic_scheduling/apps/schedule/admin.py

17 lines
436 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):
2020-05-18 16:53:40 +02:00
list_display = ('name', 'employee', 'email', 'created_at', 'status','done')
ordering = ('-created_at', 'name',)
2020-05-13 15:54:40 +02:00
search_fields = ('name', 'email')
2020-05-18 16:53:40 +02:00
list_filter = ('status',)
2020-05-13 15:54:40 +02:00
2020-05-18 16:53:40 +02:00
def done(self,obj):
return obj.done
2020-05-13 15:54:40 +02:00
2020-05-18 16:53:40 +02:00
done.boolean = True