diff options
author | maheshgudi | 2017-01-12 16:20:40 +0530 |
---|---|---|
committer | maheshgudi | 2017-01-12 16:32:18 +0530 |
commit | e87cb6c64ac30997a8a66846b0af7fdc87d47eac (patch) | |
tree | ad81e3b5042eede5095551e348884da18840ebdb | |
parent | 7fb288ffd992c912a8e2288aa97d6c6ceeedf1a1 (diff) | |
download | online_test-e87cb6c64ac30997a8a66846b0af7fdc87d47eac.tar.gz online_test-e87cb6c64ac30997a8a66846b0af7fdc87d47eac.tar.bz2 online_test-e87cb6c64ac30997a8a66846b0af7fdc87d47eac.zip |
yadded search option in answerpaper admin page, gitignore doc _builds
1. added search option in answerpaper admin page, helpful to find specific answerpapers
2. modified gitinore file, ignores _builds in docs now
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | yaksh/admin.py | 9 |
2 files changed, 9 insertions, 2 deletions
@@ -42,4 +42,4 @@ migrations wsgi.log *.sqlite3 data/ -documentation/_build/ +_build/ diff --git a/yaksh/admin.py b/yaksh/admin.py index c525ba3..72496b2 100644 --- a/yaksh/admin.py +++ b/yaksh/admin.py @@ -2,6 +2,13 @@ from yaksh.models import Question, Quiz, QuestionPaper from yaksh.models import TestCase, StandardTestCase, StdIOBasedTestCase, Course, AnswerPaper from django.contrib import admin + + +class AnswerPaperAdmin(admin.ModelAdmin): + search_fields = ['user__first_name', 'user__last_name','user__username', + "question_paper__quiz__description" ] + + admin.site.register(Question) admin.site.register(TestCase) admin.site.register(StandardTestCase) @@ -9,4 +16,4 @@ admin.site.register(StdIOBasedTestCase) admin.site.register(Course) admin.site.register(Quiz) admin.site.register(QuestionPaper) -admin.site.register(AnswerPaper)
\ No newline at end of file +admin.site.register(AnswerPaper, AnswerPaperAdmin) |