summaryrefslogtreecommitdiff
path: root/stats
diff options
context:
space:
mode:
authoradityacp2020-11-07 17:44:42 +0530
committeradityacp2020-11-07 17:44:42 +0530
commiteed832d8a67ab9c2cef874b43f73d14a48cd0c71 (patch)
treea0885c36c5058d5a62303370a3e66a45ed189e39 /stats
parentaa54b0d8ff3def794a0375fedbf8967a1e268a6c (diff)
downloadonline_test-eed832d8a67ab9c2cef874b43f73d14a48cd0c71.tar.gz
online_test-eed832d8a67ab9c2cef874b43f73d14a48cd0c71.tar.bz2
online_test-eed832d8a67ab9c2cef874b43f73d14a48cd0c71.zip
Change admin.py for stats app
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)