diff options
author | adityacp | 2020-02-11 10:22:25 +0530 |
---|---|---|
committer | adityacp | 2020-02-11 10:22:25 +0530 |
commit | 36f890621989e77663b52a46cdef45086fb9fa1d (patch) | |
tree | 0064442f9c0103437e49387cda82d055c3083514 | |
parent | 6c7325350471bcf7437fcc7f08debe19bd0365eb (diff) | |
download | online_test-36f890621989e77663b52a46cdef45086fb9fa1d.tar.gz online_test-36f890621989e77663b52a46cdef45086fb9fa1d.tar.bz2 online_test-36f890621989e77663b52a46cdef45086fb9fa1d.zip |
Register lesson and learning module in admin
-rw-r--r-- | yaksh/admin.py | 20 |
1 files 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) |