Files
Flagman/instructor/admin.py
Dmitriy 60b4e0e839 init
2025-06-23 01:24:34 +03:00

15 lines
787 B
Python

from django.contrib import admin
from .models import Instructor, InstructorSchedule
@admin.register(Instructor)
class InstructorAdmin(admin.ModelAdmin):
list_display = ('profile', 'experience_years', 'specialization', 'rating', 'is_available', 'created_at', 'updated_at')
list_filter = ('is_available', 'created_at', 'updated_at')
search_fields = ('profile__user__username', 'profile__user__email', 'specialization')
date_hierarchy = 'created_at'
@admin.register(InstructorSchedule)
class InstructorScheduleAdmin(admin.ModelAdmin):
list_display = ('instructor', 'day_of_week', 'start_time', 'end_time', 'is_available')
list_filter = ('day_of_week', 'is_available')
search_fields = ('instructor__profile__user__username', 'instructor__profile__user__email')