summaryrefslogtreecommitdiff
path: root/stats/admin.py
diff options
context:
space:
mode:
authorPalaparthy Adityachandra2020-11-07 19:07:36 +0530
committerGitHub2020-11-07 19:07:36 +0530
commit39a13424ad5b5d59044bec27530bdad1ccf12c25 (patch)
tree886f3277e1f2399eafa8ff596c72c904aaae18f8 /stats/admin.py
parent5d320e054cd125582c56a6c25a70ba57f1cccbce (diff)
parentd09ff51b6c957137e705fee73f1808c6333eed7f (diff)
downloadonline_test-39a13424ad5b5d59044bec27530bdad1ccf12c25.tar.gz
online_test-39a13424ad5b5d59044bec27530bdad1ccf12c25.tar.bz2
online_test-39a13424ad5b5d59044bec27530bdad1ccf12c25.zip
Merge pull request #794 from adityacp/video_tracking
Basic tracking for video lessons
Diffstat (limited to 'stats/admin.py')
-rw-r--r--stats/admin.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/stats/admin.py b/stats/admin.py
new file mode 100644
index 0000000..16ca528
--- /dev/null
+++ b/stats/admin.py
@@ -0,0 +1,14 @@
+# Django Imports
+from django.contrib import admin
+
+# Local Imports
+from stats.models import 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)