diff options
author | adityacp | 2020-11-07 17:44:42 +0530 |
---|---|---|
committer | adityacp | 2020-11-07 17:44:42 +0530 |
commit | eed832d8a67ab9c2cef874b43f73d14a48cd0c71 (patch) | |
tree | a0885c36c5058d5a62303370a3e66a45ed189e39 /stats/admin.py | |
parent | aa54b0d8ff3def794a0375fedbf8967a1e268a6c (diff) | |
download | online_test-eed832d8a67ab9c2cef874b43f73d14a48cd0c71.tar.gz online_test-eed832d8a67ab9c2cef874b43f73d14a48cd0c71.tar.bz2 online_test-eed832d8a67ab9c2cef874b43f73d14a48cd0c71.zip |
Change admin.py for stats app
Diffstat (limited to 'stats/admin.py')
-rw-r--r-- | stats/admin.py | 8 |
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) |