This commit is contained in:
Dmitriy
2025-06-23 01:24:34 +03:00
commit 60b4e0e839
303 changed files with 35737 additions and 0 deletions

20
analytics/admin.py Normal file
View File

@ -0,0 +1,20 @@
from django.contrib import admin
from .models import CourseAnalytics, InstructorAnalytics, StudentAnalytics
@admin.register(CourseAnalytics)
class CourseAnalyticsAdmin(admin.ModelAdmin):
list_display = ('course', 'total_students', 'average_progress', 'completion_rate', 'revenue', 'created_at', 'updated_at')
list_filter = ('created_at', 'updated_at')
search_fields = ('course__title',)
@admin.register(InstructorAnalytics)
class InstructorAnalyticsAdmin(admin.ModelAdmin):
list_display = ('instructor', 'total_lessons', 'total_students', 'average_rating', 'completion_rate', 'created_at', 'updated_at')
list_filter = ('created_at', 'updated_at')
search_fields = ('instructor__profile__user__username', 'instructor__profile__user__email')
@admin.register(StudentAnalytics)
class StudentAnalyticsAdmin(admin.ModelAdmin):
list_display = ('student', 'total_lessons', 'attendance_rate', 'average_grade', 'created_at', 'updated_at')
list_filter = ('created_at', 'updated_at')
search_fields = ('student__profile__user__username', 'student__profile__user__email')