summaryrefslogtreecommitdiff
path: root/yaksh/admin.py
diff options
context:
space:
mode:
Diffstat (limited to 'yaksh/admin.py')
-rw-r--r--yaksh/admin.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/yaksh/admin.py b/yaksh/admin.py
index 7ea8ed6..8944722 100644
--- a/yaksh/admin.py
+++ b/yaksh/admin.py
@@ -1,6 +1,6 @@
from yaksh.models import Question, Quiz, QuestionPaper, Profile
from yaksh.models import (TestCase, StandardTestCase, StdIOBasedTestCase,
- Course, AnswerPaper)
+ Course, AnswerPaper, CourseStatus)
from django.contrib import admin
@@ -14,12 +14,22 @@ class ProfileAdmin(admin.ModelAdmin):
"roll_number", "institute", "department"]
+class CourseStatusAdmin(admin.ModelAdmin):
+ search_fields = ['user__first_name', 'user__last_name', 'user__username']
+ list_filter = ['course__is_trial']
+
+
+class CourseAdmin(admin.ModelAdmin):
+ list_filter = ['active', 'is_trial']
+
+
admin.site.register(Profile, ProfileAdmin)
admin.site.register(Question)
admin.site.register(TestCase)
admin.site.register(StandardTestCase)
admin.site.register(StdIOBasedTestCase)
-admin.site.register(Course)
+admin.site.register(Course, CourseAdmin)
admin.site.register(Quiz)
admin.site.register(QuestionPaper)
admin.site.register(AnswerPaper, AnswerPaperAdmin)
+admin.site.register(CourseStatus, CourseStatusAdmin) \ No newline at end of file