summaryrefslogtreecommitdiff
path: root/yaksh/admin.py
blob: 199fb560e913a11180514824110f9bb94ab9b990 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
from yaksh.models import Question, Quiz, QuestionPaper, Profile
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","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)
admin.site.register(StdIOBasedTestCase)
admin.site.register(Course)
admin.site.register(Quiz)
admin.site.register(QuestionPaper)
admin.site.register(AnswerPaper, AnswerPaperAdmin)