Added admin view for Course model and updated admin view for Assignment model

parent cbe69b43
from django.contrib import admin from django.contrib import admin
# Register your models here. # Register your models here.
from .models import Assignment from .models import Assignment, Course
class AssignmentAdmin(admin.ModelAdmin): class AssignmentAdmin(admin.ModelAdmin):
model = Assignment model = Assignment
list_display = ('name', 'description', 'max_points') list_display = ('name', 'description', 'max_points', 'passing_score')
class CourseAdmin(admin.ModelAdmin):
mode = Course
list_display = ('course_code', 'course_title', 'section')
admin.site.register(Assignment, AssignmentAdmin) admin.site.register(Assignment, AssignmentAdmin)
admin.site.register(Course, CourseAdmin)
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