init
This commit is contained in:
15
instructor/admin.py
Normal file
15
instructor/admin.py
Normal file
@ -0,0 +1,15 @@
|
||||
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')
|
Reference in New Issue
Block a user