diff options
author | mahesh | 2017-07-12 23:36:35 +0530 |
---|---|---|
committer | mahesh | 2017-07-12 23:36:35 +0530 |
commit | bfc558d7c3cf557b9492b15379c1733d961a72a1 (patch) | |
tree | aa514aa37f404d898a9fb17ff1106c3be470b510 /yaksh/admin.py | |
parent | ebc8a2af6d4fdf52a9703701a97a3abfaf66ed06 (diff) | |
download | online_test-bfc558d7c3cf557b9492b15379c1733d961a72a1.tar.gz online_test-bfc558d7c3cf557b9492b15379c1733d961a72a1.tar.bz2 online_test-bfc558d7c3cf557b9492b15379c1733d961a72a1.zip |
adds search feature for Profile model in admin interface.
Diffstat (limited to 'yaksh/admin.py')
-rw-r--r-- | yaksh/admin.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/yaksh/admin.py b/yaksh/admin.py index 79d4930..199fb56 100644 --- a/yaksh/admin.py +++ b/yaksh/admin.py @@ -1,4 +1,4 @@ -from yaksh.models import Question, Quiz, QuestionPaper +from yaksh.models import Question, Quiz, QuestionPaper, Profile from yaksh.models import TestCase, StandardTestCase, StdIOBasedTestCase, Course, AnswerPaper from django.contrib import admin @@ -8,7 +8,11 @@ class AnswerPaperAdmin(admin.ModelAdmin): search_fields = ['user__first_name', 'user__last_name','user__username', "question_paper__quiz__description","user_ip" ] +class ProfileAdmin(admin.ModelAdmin): + search_fields = ['user__first_name', 'user__last_name','user__username', + "roll_number", "institute","department"] +admin.site.register(Profile, ProfileAdmin) admin.site.register(Question) admin.site.register(TestCase) admin.site.register(StandardTestCase) |