Commit b24cab4e authored by Deokhyun Lee's avatar Deokhyun Lee

admin panel for the model: course; assignment is finished

parent 43416390
from django.contrib import admin
from .models import Course, Assignment
# admin panel for Course model
class CourseAdmin(admin.ModelAdmin):
model = Course
list_display = ('code', 'title', 'section')
search_fields = ('code', 'title', 'section')
list_filter = ('code', 'title', 'section')
class Assignment(admin.ModelAdmin):
# admin panel for Assignment model
class AssignmentAdmin(admin.ModelAdmin):
model = Assignment
list_display = ('name', 'description', 'course', 'perfect_score', 'passing_score')
search_fields = ('name', 'description', 'course')
list_filter = ('name', 'description', 'course', 'perfect_score')
admin.site.register(Course, CourseAdmin)
admin.site.register(Assignment, AssignmentAdmin)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment