From 36f890621989e77663b52a46cdef45086fb9fa1d Mon Sep 17 00:00:00 2001 From: adityacp Date: Tue, 11 Feb 2020 10:22:25 +0530 Subject: Register lesson and learning module in admin --- yaksh/admin.py | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/yaksh/admin.py b/yaksh/admin.py index efbeb7f..3d09f69 100644 --- a/yaksh/admin.py +++ b/yaksh/admin.py @@ -1,6 +1,8 @@ from yaksh.models import Question, Quiz, QuestionPaper, Profile from yaksh.models import (TestCase, StandardTestCase, StdIOBasedTestCase, - Course, AnswerPaper, CourseStatus) + Course, AnswerPaper, CourseStatus, LearningModule, + Lesson + ) from django.contrib import admin @@ -23,13 +25,27 @@ class CourseAdmin(admin.ModelAdmin): list_filter = ['active', 'is_trial'] +class LearningModuleAdmin(admin.ModelAdmin): + list_filter = ['active', 'is_trial'] + + +class LessonAdmin(admin.ModelAdmin): + list_filter = ['active'] + + +class QuizAdmin(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, CourseAdmin) -admin.site.register(Quiz) +admin.site.register(Quiz, QuizAdmin) admin.site.register(QuestionPaper) admin.site.register(AnswerPaper, AnswerPaperAdmin) admin.site.register(CourseStatus, CourseStatusAdmin) +admin.site.register(Lesson, LessonAdmin) +admin.site.register(LearningModule, LearningModuleAdmin) -- cgit