summaryrefslogtreecommitdiff
path: root/stats
diff options
context:
space:
mode:
Diffstat (limited to 'stats')
-rw-r--r--stats/admin.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/stats/admin.py b/stats/admin.py
index b400d27..16ca528 100644
--- a/stats/admin.py
+++ b/stats/admin.py
@@ -5,4 +5,10 @@ from django.contrib import admin
from stats.models import TrackLesson
-admin.site.register(TrackLesson)
+class TrackLessonAdmin(admin.ModelAdmin):
+ search_fields = ['user__first_name', 'user__last_name', 'user__username',
+ 'course__name', 'lesson__name']
+ readonly_fields = ["course", "user", "lesson"]
+
+
+admin.site.register(TrackLesson, TrackLessonAdmin)